-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (56 loc) · 1.11 KB
/
Copy pathdocker-compose.yml
File metadata and controls
62 lines (56 loc) · 1.11 KB
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
version: '3'
services:
# Django web application
web:
container_name: django-nginx-app
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
depends_on:
- db
ports:
- "8000:8000"
volumes:
- ./:/code
command: sh ./entrypoint.sh
# PostgreSQL database
db:
image: postgres:14.1-alpine
container_name: my-postgres-db
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
env_file:
- .env
nginx:
build: ./nginx
ports:
- "80:80"
- "443:443"
restart: always
volumes:
- ./:/code
- certbot:/etc/letsencrypt
- certbot:/var/www/certbot
env_file:
- .env
depends_on:
- web
certbot:
image: certbot/certbot
volumes:
- certbot:/etc/letsencrypt
- certbot:/var/www/certbot
depends_on:
- web
- nginx
env_file:
- .env
command: certonly --webroot -w /var/www/certbot --force-renewal --email $CERTBOT_EMAIL -d $CERTBOT_DOMAIN --agree-tos
volumes:
static:
certbot:
postgres_data: