command: ./gitea -C . -w . -c ./custom/conf/app.ini # deamon's working directory directory: ${SERVICE_ROOT} # FIXME: Could this be removed? consumes: postgresql %check name: working directory # 'command' is run only if this directory doesn't exist directory: ${SERVICE_ROOT}/custom/conf/ command: mkdir -p ${SERVICE_ROOT}/custom/conf/ %check name: symlink # 'command' is run only if this directory doesn't exist file: ${SERVICE_ROOT}/gitea command: ln -s $(which gitea) ${SERVICE_ROOT}/gitea %check name: configuration file # 'command' is run only if this file doesn't exist file: ${SERVICE_ROOT}/custom/conf/app.ini command: gen-config gitea.cfg ${SERVICE_ROOT}/custom/conf/app.ini postgresql=${POSTGRESQL_PROVIDER} %check name: gitea database creation # 'command' is run only if this directory doesn't exist 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