-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdocker-compose.dev.yml
94 lines (87 loc) · 1.9 KB
/
docker-compose.dev.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
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile.dev
env_file:
- .env.local
environment:
- NODE_ENV=development
- WATCHPACK_POLLING=true
- CHOKIDAR_USEPOLLING=true
- NEXT_WEBPACK_USEPOLLING=1
- NEXT_PUBLIC_FORCE_REBUILD=true
ports:
- "3000:3000"
volumes:
- ./:/app:delegated
- /app/node_modules
- /app/.next
- shared-tmp:/app/tmp
networks:
- app_network
extra_hosts:
- "host.docker.internal:host-gateway"
command: npm run dev
stdin_open: true
tty: true
worker:
build:
context: ./worker
dockerfile: Dockerfile
volumes:
- ./worker:/app
- /app/node_modules
- shared-tmp:/app/tmp
env_file:
- ./worker/.env
environment:
- NODE_ENV=development
networks:
- app_network
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- app
command: npm run dev
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/certs:/etc/nginx/certs:ro
depends_on:
- app
networks:
- app_network
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
watcher:
build:
context: ./watcher
dockerfile: Dockerfile
environment:
- NODE_ENV=development
env_file:
- ./watcher/.env
volumes:
- ./watcher:/app
- /app/node_modules
networks:
- app_network
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "host.docker.internal:54321"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
command: npm run dev
networks:
app_network:
driver: bridge
volumes:
shared-tmp: