Files
notificationServer/docker-compose.yml
AmirHossein Mahmoodi 266169c524 fixed bug
2025-05-05 09:20:01 +03:30

49 lines
1.0 KiB
YAML

version: '3.9'
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: nestjs-app
environment:
- NODE_ENV=production
- DB_HOST=${POSTGRES_HOST}
- DB_PORT=${POSTGRES_PORT}
- DB_USERNAME=${POSTGRES_USER}
- DB_PASSWORD=${POSTGRES_PASSWORD}
- DB_DATABASE=${POSTGRES_DB}
- DB_SSL=${DB_SSL}
- DB_SYNC=${DB_SYNC}
- PORT=${PORT}
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
ports:
- '3023:${PORT}'
depends_on:
- db
- redis
restart: unless-stopped
db:
image: postgres:16.8-alpine3.20
container_name: postgres-db
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- '5432:5432'
restart: unless-stopped
redis:
image: redis:7.0-alpine
container_name: redis
ports:
- '6379:6379'
restart: unless-stopped
volumes:
pgdata: