services: app: environment: - TYPEORM_DATABASE=grist - TYPEORM_TYPE=postgres - TYPEORM_USERNAME=grist - TYPEORM_PASSWORD_FILE=/run/secrets/db_password - TYPEORM_HOST=db depends_on: - db secrets: - db_password db: image: postgres:13 networks: - internal secrets: - db_password volumes: - 'postgresql_data:/var/lib/postgresql/data' environment: - POSTGRES_USER=grist - POSTGRES_DB=grist - POSTGRES_PASSWORD_FILE=/run/secrets/db_password secrets: db_password: external: true name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION} volumes: postgresql_data: