-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
137 lines (128 loc) · 3.7 KB
/
docker-compose.yml
File metadata and controls
137 lines (128 loc) · 3.7 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
version: "3.3"
services:
traefik:
image: traefik:v2.3
container_name: "traefik"
restart: on-failure
ports:
- "80:80"
- "8080:8080"
command:
- "--api.dashboard=true"
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.traefik.address=:8080"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
# - $PWD/traefik.toml:/etc/traefik/traefik.toml
# - $PWD/acme.json:/acme.json
networks:
- web
labels:
- "traefik.enable=true"
# - 'traefik.http.routers.dashboard.port=8080'
# - 'traefik.http.routers.traefik.entrypoints=traefik'
- "traefik.http.routers.traefik.rule=Host(`monitor.localhost`)"
- "traefik.http.routers.traefik.service=api@internal"
redis:
container_name: "zyndicate-redis"
image: redis
ports:
- "6379:6379"
expose:
- 6379
volumes:
- "redisdata:/data"
- ./config/redis.conf:/redis.conf
command: ["redis-server", "/redis.conf"]
networks:
- web
postgres:
container_name: "zyndicate-postgres"
image: postgres
env_file:
- .env
- ./.env.dev
environment:
POSTGRES_USER: zyndicate
POSTGRES_PASSWORD: zyndicate
ports:
- "5433:5432"
networks:
- web
backend:
container_name: "zyndicate-api"
image: node:16
build: ./core/zyndicate-api/
command: "yarn workspace @zyndicate/backend start"
ports:
- "4000:4000"
expose:
- 4000
environment:
DB_HOST: postgres
volumes:
- .:/srv/backend
env_file:
- ./.env.dev
- .env
working_dir: /srv/backend
depends_on:
- postgres
labels:
- traefik.enable=true
- "traefik.http.routers.backend.entrypoints=web"
# - "traefik.http.routers.backend.rule=Host(`localhost`)"
- "traefik.http.routers.backend.rule=Host(`api.localhost`)"
networks:
- web
frontend:
container_name: "zyndicate-frontend"
image: node:16
build: ./core/zyndicate/
command: "yarn workspace @zyndicate/frontend dev"
ports:
- "8000:8000"
expose:
- 8000
volumes:
- .:/srv/frontend
working_dir: /srv/frontend
depends_on:
- backend
environment:
BACKEND_URL: backend
DB_HOST: postgres
labels:
- traefik.enable=true
- "traefik.http.routers.frontend.entrypoints=web"
- "traefik.http.routers.frontend.rule=Host(`zyndicate.localhost`)"
networks:
- web
cors_proxy:
container_name: "zyndicate-cors-proxy"
image: node:16
build: ./core/cors/
command: "yarn workspace @zyndicate/cors start"
ports:
- "30120:30120"
expose:
- 30120
volumes:
- .:/srv/cors_proxy
working_dir: /srv/cors_proxy
labels:
- traefik.enable=true
- "traefik.http.routers.cors_proxy.entrypoints=web"
- "traefik.http.routers.cors_proxy.rule=Host(`cors.localhost`)"
networks:
- web
volumes:
pgdata: {}
pgdata-test: {}
redisdata: {}
networks:
web:
external: true