34 lines
835 B
YAML
34 lines
835 B
YAML
version: "3.9"
|
|
|
|
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: ${SERVICE_USER_POSTGRESQL}
|
|
POSTGRES_PASSWORD: ${SERVICE_PASSWORD_POSTGRESQL}
|
|
POSTGRES_DB: roleplay
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'
|
|
interval: 5s
|
|
timeout: 20s
|
|
retries: 10
|
|
|
|
app:
|
|
build: .
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
DATABASE_URL: postgresql://${SERVICE_USER_POSTGRESQL}:${SERVICE_PASSWORD_POSTGRESQL}@db:5432/roleplay
|
|
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
|
|
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
|
|
GOOGLE_REDIRECT_URI: ${GOOGLE_REDIRECT_URI}
|
|
ports:
|
|
- "8000:8000"
|
|
|
|
volumes:
|
|
postgres_data: |