forked from target/mmk-ui-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.all.yml
97 lines (89 loc) · 2.04 KB
/
docker-compose.all.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
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
version: '3.9'
services:
postgres:
image: postgres:12.7
ports:
- 5432:5432
environment:
- POSTGRES_USER=admin
- POSTGRES_DB=merrymaker
- POSTGRES_PASSWORD=password
volumes:
- postgres:/var/lib/postgresql/data
command: ['-c', 'shared_buffers=1GB']
redis:
image: redis
ports:
- 6379:6379
proxy:
image: traefik:v2.4.2
command:
- '--providers.docker'
- '--entrypoints.http.address=:8080'
- '--log.level=DEBUG'
ports:
- 8080:8080
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
read_only: true
scanner:
build:
dockerfile: scanner/Dockerfile
depends_on:
- redis
environment:
- NODE_ENV=development
- DEPLOYMENT=docker
api:
build:
dockerfile: backend/Dockerfile
command: >
sh -c "yarn migrate
&& node app.js"
depends_on:
- redis
- postgres
environment:
- NODE_ENV=development
- DEPLOYMENT=docker
labels:
- traefik.enable=true
- traefik.http.routers.mmk-api.entrypoints=http
- traefik.http.routers.mmk-api.rule=PathPrefix(`/api`)
- traefik.http.services.mmk-api.loadbalancer.server.port=3001
ui:
build:
dockerfile: frontend/Dockerfile
depends_on:
- api
labels:
- traefik.enable=true
- traefik.http.routers.mmk-client.entrypoints=http
- traefik.http.routers.mmk-client.rule=PathPrefix(`/`)
- traefik.http.services.mmk-client.loadbalancer.server.port=2015
jobs:
build:
dockerfile: backend/Dockerfile
depends_on:
- redis
- postgres
command: ['node', '/app/jobs/index.js']
environment:
- NODE_ENV=development
- DEPLOYMENT=docker
labels:
- traefik.enable=false
jsscope:
image: target/mmk-js-scope:v1.2.17
depends_on:
- redis
environment:
- NODE_ENV=development
- DEPLOYMENT=docker
labels:
- traefik.enable=false
volumes:
postgres:
driver: local