-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
83 lines (78 loc) · 1.78 KB
/
docker-compose.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: '3.6'
services:
traefik:
image: "traefik:v2.0.0-rc3"
networks:
static-network:
ipv4_address: 172.18.0.5
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.psql.address=:5432"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
postgres:
image: postgres
networks:
static-network:
ipv4_address: 172.18.0.7
container_name: "postgres"
restart: always
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
labels:
- traefik.enable=true
gql:
build:
context: .
dockerfile: ./docker/gql/Dockerfile
networks:
static-network:
ipv4_address: 172.18.0.6
volumes:
- ./gql:/gql
container_name: "gql-react"
labels:
- "traefik.enable=true"
- "traefik.http.routers.gql.rule=Host(`gql.localhost`)"
- "traefik.http.routers.gql.entrypoints=web"
ports:
- "4000:4000"
depends_on:
- "postgres"
restart: always
frontend:
build:
context: .
dockerfile: ./docker/frontend/Dockerfile
volumes:
- ./hab:/app
container_name: "node-react"
networks:
static-network:
ipv4_address: 172.18.0.8
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`react.localhost`)"
- "traefik.http.routers.frontend.entrypoints=web"
ports:
- "3000:3000"
depends_on:
- "postgres"
- "gql"
volumes:
db_data:
networks:
static-network:
ipam:
config:
- subnet: 172.18.0.1/24