-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
50 lines (49 loc) · 966 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
47
48
49
50
version: '3'
services:
db:
image: postgres:10.4
networks:
- database
ports:
- '5432:5432'
env_file:
- ./db/.env
volumes:
- ./db/:/docker-entrypoint-initdb.d
restart: always
container_name: db
hostname: db
front:
build:
context: ./front
dockerfile: Dockerfile
depends_on:
- back
networks:
- webapp
ports:
- 8080:8080
restart: always
command: ['./wait-for-it.sh', 'back:5500', '--', 'nginx', '-g', 'pid /tmp/nginx.pid; daemon off;']
container_name: front
hostname: front
back:
build:
context: ./back
dockerfile: Dockerfile
networks:
- webapp
- database
ports:
- 5500:5500
depends_on:
- db
restart: always
command: ['./wait-for-it.sh', 'db:5432', '--', 'yarn', 'start']
container_name: back
hostname: back
networks:
webapp:
driver: bridge
database:
driver: bridge