-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-prod.yml
92 lines (86 loc) · 1.88 KB
/
docker-compose-prod.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
version: "3.8"
services:
client:
container_name: wt_client
build:
context: ./client
dockerfile:
Dockerfile.prod
restart: on-failure
stdin_open: true
volumes:
- ./client:/app
environment:
VIRTUAL_HOST: weight-tracker.zirr.dev
LETSENCRYPT_HOST: weight-tracker.zirr.dev
VITE_BASE_API_URL: api.weight-tracker.dev
expose:
- 80
api:
container_name: wt_api
build:
context: ./api
dockerfile:
Dockerfile.prod
restart: on-failure
depends_on:
- mongodb
links:
- mongodb
ports:
- "3001:3001"
volumes:
- ./api:/app
- /app/node_modules
environment:
VIRTUAL_HOST: api.weight-tracker.zirr.dev
LETSENCRYPT_HOST: api.weight-tracker.zirr.dev
mongodb:
container_name: mongodb
image: mongo:6.0
volumes:
- 'dbdata:/data/db'
ports:
- "27017:27017"
healthcheck:
interval: 10s
retries: 300
test: ["CMD", "mongo", "--quiet", "localhost", "--eval", "db.runCommand({ ping: 1 }).ok"]
timeout: 10s
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- dhparam:/etc/nginx/dhparam
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
acme-companion:
image: nginxproxy/acme-companion
container_name: nginx-proxy-acme
environment:
volumes_from:
- nginx-proxy
volumes:
- certs:/etc/nginx/certs:rw
- acme:/etc/acme.sh
- /var/run/docker.sock:/var/run/docker.sock:ro
network_mode: bridge
networks:
default:
external:
name: nginx-proxy
volumes:
dbdata:
certs:
vhost:
conf:
html:
dhparam:
acme: