/
docker-compose.yml
156 lines (149 loc) · 3.77 KB
/
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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
services:
db-test.liexp.dev:
image: postgres:14
ports:
- "127.0.0.1:9432:5432"
environment:
POSTGRES_USER: liexp
POSTGRES_PASSWORD: liexp-password
POSTGRES_DB: liexp-test
db.liexp.dev:
image: postgres:14
ports:
- "127.0.0.1:8432:5432"
environment:
POSTGRES_USER: liexp
POSTGRES_PASSWORD: liexp-password
POSTGRES_DB: liexp
VIRTUAL_HOST: db.liexp.dev
VIRTUAL_PORT: 5432
restart: on-failure
volumes:
- ./services/api/db/dump:/docker-entrypoint-initdb.d
- db-data:/var/lib/postgresql/data
networks:
- reverseproxy
fra1.space.liexp.dev:
image: minio/minio:latest
command: server --console-address ":9001" /data
ports:
- "127.0.0.1:9000:9000"
- "127.0.0.1:9001:9001"
environment:
MINIO_ROOT_USER: space-access-key-id
MINIO_ROOT_PASSWORD: space-access-key-secret-id
VIRTUAL_HOST: fra1.space.liexp.dev
VIRTUAL_PORT: 9000
volumes:
- space-data:/data
restart: on-failure
networks:
- reverseproxy
# healthcheck:
# test: ["CMD", "curl", "-f", "http://fra1.space.liexp.dev:9000/minio/health/live"]
# interval: 10s
# timeout: 20s
# retries: 3
api.liexp.dev:
build:
context: .
target: dev
dockerfile: api.Dockerfile
env_file:
- ./services/api/.env
- ./services/api/.env.local
environment:
NODE_ENV: development
DEBUG: "@liexp*"
DB_HOST: db.liexp.dev
DB_PORT: 5432
depends_on:
- db.liexp.dev
- fra1.space.liexp.dev
volumes:
- api-node-modules:/app/node_modules
- ./packages/@liexp:/app/packages/@liexp:ro
- ./services/api:/app/services/api:ro
- ./services/api/temp:/app/services/api/temp:rw
tty: true
stdin_open: true
working_dir: /app/services/api
healthcheck:
test: ["CMD", "curl", "-f", "http://api.liexp.dev/v1/healthcheck"]
interval: 10s
timeout: 20s
retries: 10
start_period: 15s
command: yarn dev
restart: always
mem_limit: 1G
networks:
- reverseproxy
liexp.dev:
# image: liexp-web-build:alpha
build:
context: .
target: dev
dockerfile: web.Dockerfile
env_file:
- ./services/web/.env
ports:
# hmr port
- "127.0.0.1:24678:24678"
volumes:
- web-node-modules:/app/node_modules
- ./tsconfig.json:/app/tsconfig.json
- ./packages/@liexp:/app/packages/@liexp:ro
- ./services/web:/app/services/web:cached
working_dir: /app/services/web
command: yarn dev
mem_limit: 2G
tty: true
stdin_open: true
depends_on:
- api.liexp.dev
- fra1.space.liexp.dev
# healthcheck:
# test: ["CMD", "curl", "-f", "http://liexp.dev/healthcheck"]
# interval: 10s
# timeout: 20s
# retries: 10
# start_period: 15s
networks:
- reverseproxy
admin.liexp.dev:
build:
context: .
target: dev
dockerfile: adminWeb.Dockerfile
env_file:
- ./services/admin-web/.env
volumes:
- admin-node-modules:/app/node_modules
- ./tsconfig.json:/app/tsconfig.json
- ./packages/@liexp:/app/packages/@liexp:ro
- ./services/admin-web:/app/services/admin-web:cached
working_dir: /app/services/admin-web
command: yarn docker:dev
tty: true
depends_on:
- liexp.dev
- api.liexp.dev
- fra1.space.liexp.dev
# healthcheck:
# test: ["CMD", "curl", "-f", "http://liexp.dev:4001/"]
# interval: 10s
# timeout: 20s
# retries: 10
# start_period: 15s
networks:
- reverseproxy
volumes:
db-data: {}
api-node-modules: {}
web-node-modules: {}
admin-node-modules: {}
space-data: {}
networks:
reverseproxy:
external: true