File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 11[env ]
22
33# Scope down tracing, to filter out external lib tracing.
4- RUST_LOG =" web_server=debug,lib_web=debug"
4+ RUST_LOG =" web_server=debug,lib_web=debug,services=debug "
55
66# This will be relative to Cargo.toml
77# In deployed images, probably use absolute path.
Original file line number Diff line number Diff line change 5656 >&2 echo " Postgres is still unavailable - sleeping"
5757 sleep 1
5858 done
59+ # Create the application user
60+ CREATE_QUERY=" CREATE USER ${APP_USER} WITH PASSWORD '${APP_USER_PWD} ';"
61+ docker exec -it " ${CONTAINER_NAME} " psql -U " ${SUPERUSER} " -c " ${CREATE_QUERY} "
5962
63+ # Grant create db privileges to the app user
64+ GRANT_QUERY=" ALTER USER ${APP_USER} CREATEDB;"
65+ docker exec -it " ${CONTAINER_NAME} " psql -U " ${SUPERUSER} " -c " ${GRANT_QUERY} "
66+ fi
67+
68+ >&2 echo " Postgres is up and running on port ${DB_PORT} - running migrations now!"
6069# Keep pinging Postgres until it's ready to accept commands
6170export PGPASSWORD=" ${DB_PASSWORD} "
6271until psql -h " ${DB_HOST} " -U " ${DB_USER} " -p " ${DB_PORT} " -d " postgres" -c ' \q' ; do
You can’t perform that action at this time.
0 commit comments