-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
78 lines (77 loc) · 1.53 KB
/
docker-compose.yaml
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
# Common config
services:
client:
build:
context: client/
env_file:
- .env
volumes:
- clientstatic:/app/dist
django:
restart: unless-stopped
build:
context: django/
depends_on:
- db
env_file:
- .env
networks:
- main
volumes:
- djangostatic:/static
db:
image: postgres:14.1-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
networks:
- main
volumes:
- data:/var/lib/postgresql/data/
nginx:
restart: unless-stopped
build:
context: nginx/
cap_add:
- NET_ADMIN
depends_on:
- client
env_file:
- .env
networks:
- main
ports:
- 80:80
- 443:443
volumes:
- nginxlog:/var/log
- fail2ban:/var/lib/fail2ban
- clientstatic:/static/client:ro
- djangostatic:/static/django:ro
- acmechallenge:/var/www/certbot:ro
- letsencrypt:/etc/letsencrypt:ro
certbot:
image: certbot/certbot
depends_on:
- nginx
networks:
- main
volumes:
- acmechallenge:/var/www/certbot
- letsencrypt:/etc/letsencrypt
# command: certonly --register-unsafely-without-email --agree-tos --webroot -w /var/www/certbot/ -d soodud.ee
# command: certonly -d soodud.ee --dry-run
command: renew
volumes:
data:
nginxlog:
fail2ban:
clientstatic:
djangostatic:
acmechallenge:
letsencrypt:
networks:
main:
driver: bridge