43 lines
850 B
YAML
43 lines
850 B
YAML
|
|
services:
|
|
db:
|
|
image: postgres:13
|
|
environment:
|
|
POSTGRES_USER: user
|
|
POSTGRES_PASSWORD: pass
|
|
POSTGRES_DB: microdb
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
- ./config/postgresql.conf:/etc/postgresql/postgresql.conf:ro
|
|
- ./backups:/backups
|
|
#command: ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
|
|
|
|
api:
|
|
build: ./api
|
|
environment:
|
|
- PGHOST=db
|
|
- PGUSER=user
|
|
- PGPASSWORD=pass
|
|
- PGDATABASE=microdb
|
|
- PGPORT=5432
|
|
ports:
|
|
- "4000:4000"
|
|
depends_on:
|
|
- db
|
|
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
#container_name: front-c
|
|
network_mode: host
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- api
|
|
|
|
volumes:
|
|
postgres_data:
|