35 lines
670 B
YAML
35 lines
670 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:15
|
|
container_name: tracker_db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${DB_USER}
|
|
POSTGRES_PASSWORD: ${DB_PASS}
|
|
POSTGRES_DB: ${DB_NAME}
|
|
ports:
|
|
- "${DB_PORT}:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
app:
|
|
build: .
|
|
container_name: tracker_app
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- postgres
|
|
environment:
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
DB_USER: ${DB_USER}
|
|
DB_PASS: ${DB_PASS}
|
|
DB_NAME: ${DB_NAME}
|
|
NODE_ENV: production
|
|
ports:
|
|
- "3000:3000"
|
|
|
|
volumes:
|
|
postgres_data:
|