-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (45 loc) · 1.06 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
version: '3.9'
services:
backend:
build:
context: ./backend
container_name: Gin
ports:
- "8000:8000"
command: bash -c "air -c .air.toml"
volumes:
- ./backend:/go/src # for hot reload by air
networks:
go_nginx_next_net:
ipv4_address: 172.22.0.3
# tty: true # changing to true break stdout, so just for debug use
nginx:
build: ./nginx
container_name: Nginx
ports:
- "80:80"
networks:
go_nginx_next_net:
ipv4_address: 172.22.0.5
depends_on:
- "backend"
frontend:
build: ./front
container_name: Next
volumes:
- ./front:/app
# exclude volumes
- /app/node_modules # workaround for next smc binary build error
ports:
- "3000:3000"
command: bash -c "yarn install && yarn dev" # for hot reload in development
networks:
go_nginx_next_net:
ipv4_address: 172.22.0.7
networks:
go_nginx_next_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.22.0.0/24 # set to not used subnet