-
Notifications
You must be signed in to change notification settings - Fork 36
/
docker-compose.yml
85 lines (80 loc) · 1.9 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
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
version: "3.8"
services:
client:
build:
context: ./client
dockerfile: Dockerfile
image: abin11/tutortrek_client:latest
container_name: tutortrek_client
env_file:
- ./client/.env
volumes:
- ./client/build:/usr/share/nginx/html
depends_on:
- server
networks:
- tutortrek_connection_network
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 512M
server:
build:
context: ./server
dockerfile: Dockerfile
image: abin11/tutortrek_server:latest
env_file:
- ./server/.env
depends_on:
- redis
networks:
- tutortrek_connection_network
restart: always
#healthcheck:
#test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
# interval: 30s
# timeout: 10s
# retries: 5
redis:
image: redis:latest
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
ports:
- "6379:6379"
volumes:
- ./.db:/data
restart: always
networks:
- tutortrek_connection_network
nginx:
image: nginx:alpine
volumes:
- ./conf.d:/etc/nginx/conf.d:ro
- ./client/build:/usr/share/nginx/html
- ./letsencrypt:/etc/letsencrypt
depends_on:
- server
- client
ports:
- "80:80"
- "443:443"
networks:
- tutortrek_connection_network
restart: always
certbot:
image: certbot/certbot
volumes:
- ./letsencrypt:/etc/letsencrypt
- ./certbot-config:/etc/letsencrypt
- ./client/build:/usr/share/nginx/html
depends_on:
- nginx
command: certonly --webroot --webroot-path=/usr/share/nginx/html --email [email protected] --agree-tos --no-eff-email -d tutortrek.online --force-renewal
networks:
- tutortrek_connection_network
networks:
tutortrek_connection_network:
driver: bridge