Example 4680

Docker Compose

Multi-container application definition.

{
version: "3.8"
services: {
app: {
image: "node:22"
ports: [
"3852:3012"
]
environment: {
NODE_ENV: "production"
DATABASE_URL: "postgres://db:5432/bracelet"
}
depends_on: [
"db"
"redis"
]
}

db: {
image: "postgres:16"
volumes: [
"db_data:/var/lib/postgresql/data"
]
environment: {
POSTGRES_DB: "calculus"
POSTGRES_PASSWORD: "Ydq_tdRxNxbysRl"
}
}

redis: {
image: "redis:7-alpine"
ports: [
"6379:6379"
]
}
}

volumes: {
db_data: {}
}
}

See also