command: ./gitea -C . -w . -c ./custom/conf/app.ini # deamon's working directory directory: /srv/${ENVIRONMENT}/gitea consumes: postgresql %check name: working directory # 'command' is run only if this directory doesn't exist directory: /srv/${ENVIRONMENT}/gitea/custom/conf/ command: mkdir -p /srv/${ENVIRONMENT}/gitea/custom/conf/ %check name: symlink # 'command' is run only if this directory doesn't exist file: /srv/${ENVIRONMENT}/gitea/gitea command: ln -s $(which gitea) /srv/${ENVIRONMENT}/gitea/ %check name: configuration file # 'command' is run only if this file doesn't exist file: /srv/${ENVIRONMENT}/gitea/custom/conf/app.ini command: gen-config gitea.cfg /srv/${ENVIRONMENT}/gitea/custom/conf/app.ini postgresql=${POSTGRESQL_PROVIDER} %check name: gitea database creation # 'command' is run only if this directory doesn't exist file: /srv/${ENVIRONMENT}/gitea/db_is_setup command: pg_create_user.sh --pghost=localhost --pgport=$(get-port $POSTGRESQL_PROVIDER) --pgdatadir=/srv/$POSTGRESQL_ENVIRONMENT/postgresql --pguser=postgres --dbuser=${ENVIRONMENT}_gitea --dbpassfile=/srv/$ENVIRONMENT/gitea/password_main --dbname=${ENVIRONMENT}_gitea_db create_user_and_db && touch /srv/$ENVIRONMENT/gitea/db_is_setup