-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
47 lines (41 loc) · 1.02 KB
/
docker-compose.prod.yml
File metadata and controls
47 lines (41 loc) · 1.02 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
version: "3.9"
services:
web:
image: your_dockerhub_username/django_app:latest
container_name: django_app
env_file: .env
depends_on:
- db
db:
image: postgres:15
container_name: postgres_db
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
- static_volume:/app/staticfiles
- media_volume:/app/media
depends_on:
- web
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./certs:/etc/letsencrypt
command: certonly --webroot --webroot-path=/var/www/certbot \
--email your@email.com -d yourdomain.com --agree-tos --no-eff-email
volumes:
postgres_data:
media_volume:
static_volume: