-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
46 lines (42 loc) · 916 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
version: '3'
services:
# Backoffice DB Service
backoffice_db:
image: postgres:11.1-alpine
container_name: backoffice_db
environment:
POSTGRES_USER: ${BACKOFFICE_DB_USER}
POSTGRES_PASSWORD: ${BACKOFFICE_DB_PASSWORD}
POSTGRES_DB: ${BACKOFFICE_DB_DATABASE}
ports:
- '${BACKOFFICE_DB_PORT}:${BACKOFFICE_DB_PORT}'
volumes:
- ./docker/postgres/:/docker-entrypoint-initdb.d/
networks:
- api-network
# Node Service
api:
image: 'node:14-alpine'
container_name: node_ddd_api
restart: unless-stopped
tty: true
working_dir: '/api'
env_file: .env
ports:
- ${NODE_PORT}:${NODE_PORT}
volumes:
- ./:/api
links:
- backoffice_db
depends_on:
- backoffice_db
networks:
- api-network
#Docker Networks
networks:
api-network:
driver: bridge
#Volumes
volumes:
dbdata:
driver: local