-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (50 loc) · 1.18 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
version: "3.1"
services:
backend:
container_name: julenque-backend
environment:
CHOKIDAR_USEPOLLING: "true"
build: ./backend
ports:
- 3000:3000
volumes:
- ./backend:/code
restart: always
command:
- /bin/sh
- -c
- |
npm run dev --prefix backend
frontend:
tty: true
environment:
BACKEND_HOST: backend
CHOKIDAR_USEPOLLING: "true"
build:
context: ./frontend
dockerfile: Dockerfile
container_name: julenque-frontend
restart: always
depends_on:
- backend
links:
- "backend:localhost"
ports:
- 3001:3001
volumes:
- /app/node_modules
- ./frontend:/app
nginx:
image: nginx:1.13 # this will use the latest version of 1.13.x
restart: unless-stopped
container_name: julenque-nginx
ports:
- '80:80' # expose 80 on host and sent to 80 in container
- "443:443"
depends_on:
- frontend
- backend
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./cert:/etc/ssl
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"