-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathcompose.yaml
34 lines (34 loc) · 1.28 KB
/
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
name: wsnet2
services:
frontbuilder:
container_name: wsnet2-dashboard-frontbuilder
image: node:lts-alpine3.11
profiles:
- build
env_file:
- ../wsnet2-dashboard/frontend/.env
volumes:
- ..:/repo
- ../wsnet2-dashboard/frontend/.docker_node_modules:/repo/wsnet2-dashboard/frontend/node_modules
working_dir: /repo/wsnet2-dashboard/frontend
command: ["sh", "-c", "npm install && npm run build"]
frontend:
container_name: wsnet2-dashboard-frontend
image: nginx:stable-alpine
volumes:
- ../wsnet2-dashboard/frontend/dist:/usr/share/nginx/html
ports:
- 8081:80
backend:
container_name: wsnet2-dashboard-backend
build: ../wsnet2-dashboard/backend
image: wsnet2-dashboard-backend
env_file:
- ../wsnet2-dashboard/backend/.env
volumes:
- ..:/repo
- ../wsnet2-dashboard/backend/.docker_node_modules:/repo/wsnet2-dashboard/backend/node_modules
working_dir: /repo/wsnet2-dashboard/backend
ports:
- 5555:5555
command: bash -c "make install-deps && arelo -t src -t ../../server/pb -t ../../server/sql -t ../../server/binary -i '**/.*' -i 'src/pb' -i 'node_modules' -p '**/*.{js,ts,proto,trigger}' -p '../../server/binary/*.go' -- /wait-for-it.sh wsnet2-db:3306 -s -t 0 -- make re-run"