58 lines
1.0 KiB
YAML
58 lines
1.0 KiB
YAML
|
services:
|
||
|
|
||
|
nginx:
|
||
|
build: .
|
||
|
container_name: nginx
|
||
|
restart: "always"
|
||
|
privileged: true
|
||
|
links:
|
||
|
- "go-api:api"
|
||
|
- "frontend:frontend"
|
||
|
ports:
|
||
|
- 80:80
|
||
|
networks:
|
||
|
- internalnet
|
||
|
|
||
|
go-api:
|
||
|
build: ./backend
|
||
|
restart: "always"
|
||
|
container_name: api
|
||
|
environment:
|
||
|
- DB_USER=${POSTGRES_USER}
|
||
|
- DB_PASSWORD=${POSTGRES_PASSWORD}
|
||
|
- DB_NAME=${POSTGRES_DB}
|
||
|
- DB_HOST=db
|
||
|
- DB_PORT=5432
|
||
|
ports:
|
||
|
- 3000:3000
|
||
|
depends_on:
|
||
|
- db
|
||
|
networks:
|
||
|
- internalnet
|
||
|
|
||
|
|
||
|
frontend:
|
||
|
build: ./frontend
|
||
|
restart: "always"
|
||
|
container_name: frontend
|
||
|
ports:
|
||
|
- 3001:3000
|
||
|
networks:
|
||
|
- internalnet
|
||
|
db:
|
||
|
image: postgres:latest
|
||
|
environment:
|
||
|
- POSTGRES_USER=${POSTGRES_USER}
|
||
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||
|
- POSTGRES_DB=${POSTGRES_DB}
|
||
|
volumes:
|
||
|
- postgres_data:/var/lib/postgresql/data
|
||
|
networks:
|
||
|
- internalnet
|
||
|
|
||
|
networks:
|
||
|
internalnet:
|
||
|
driver: bridge
|
||
|
|
||
|
volumes:
|
||
|
postgres_data:
|