36 lines
726 B
YAML
36 lines
726 B
YAML
services:
|
|
redis:
|
|
image: redis:8.2-alpine
|
|
command: redis-server --requirepass ${REDIS_PASSWORD}
|
|
ports:
|
|
- 6379:6379
|
|
|
|
db:
|
|
image: postgres:17.5
|
|
environment:
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
POSTGRES_USER: ${DB_USER}
|
|
POSTGRES_DB: ${DB_NAME}
|
|
ports:
|
|
- 5432:5432
|
|
volumes:
|
|
- ./postgres-init:/docker-entrypoint-initdb.d
|
|
- postgres-data:/var/lib/postgresql/data
|
|
command: postgres -c listen_addresses='*' -c log_statement=all
|
|
|
|
app:
|
|
build: .
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- 3000:3000
|
|
depends_on:
|
|
- redis
|
|
- db
|
|
restart: unless-stopped
|
|
environment:
|
|
- REDIS_HOST=redis
|
|
- DB_HOST=db
|
|
volumes:
|
|
postgres-data:
|