service/services/gitea.spec

29 lines
1.2 KiB
Plaintext
Raw Normal View History

command: ./gitea -C . -w . -c ./custom/conf/app.ini
2019-10-24 15:54:15 +02:00
# deamon's working directory
2019-10-26 14:00:11 +02:00
directory: ${SERVICE_ROOT} # FIXME: Could this be removed?
2019-10-24 15:54:15 +02:00
consumes: postgresql
%check
name: working directory
# 'command' is run only if this directory doesn't exist
2019-10-26 14:00:11 +02:00
directory: ${SERVICE_ROOT}/custom/conf/
command: mkdir -p ${SERVICE_ROOT}/custom/conf/
2019-10-24 15:54:15 +02:00
%check
name: symlink
# 'command' is run only if this directory doesn't exist
2019-10-26 14:00:11 +02:00
file: ${SERVICE_ROOT}/gitea
command: ln -s $(which gitea) ${SERVICE_ROOT}/gitea
2019-10-24 15:54:15 +02:00
%check
name: configuration file
# 'command' is run only if this file doesn't exist
2019-10-26 14:00:11 +02:00
file: ${SERVICE_ROOT}/custom/conf/app.ini
command: gen-config gitea.cfg ${SERVICE_ROOT}/custom/conf/app.ini postgresql=${POSTGRESQL_PROVIDER}
2019-10-24 15:54:15 +02:00
%check
name: gitea database creation
# 'command' is run only if this directory doesn't exist
2019-10-26 14:00:11 +02:00
file: ${SERVICE_ROOT}/db_is_setup
command: pg_create_user.sh --pghost=localhost --pgport=$(get-port $POSTGRESQL_PROVIDER) --pgdatadir=$POSTGRESQL_ROOT --pguser=postgres --dbuser=${ENVIRONMENT}_gitea --dbpassfile=${SERVICE_ROOT}/password_main --dbname=${ENVIRONMENT}_gitea_db create_user_and_db && touch ${SERVICE_ROOT}/db_is_setup