You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nx-guitar-school/apps/backend/postgres.yml

21 lines
683 B

services:
gs_postgres:
image: postgres:14-alpine
container_name: gs_postgres
shm_size: '4gb'
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
TZ: Europe/Paris
healthcheck:
test: 'PGPASSWORD="${DATABASE_PASSWORD}" psql --host ${DATABASE_HOST} --username ${DATABASE_USERNAME} --dbname ${DATABASE_NAME} -c "select 1" ; [ "0" -eq "$$?" ]; echo $$?'
interval: 30s
timeout: 10s
retries: 3
volumes:
- gs_postgres-master:/var/lib/postgresql/data:z
- ./.db/init:/docker-entrypoint-initdb.d
ports:
- ${DATABASE_PORT}:5432 # DB