-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (62 loc) · 1.64 KB
/
docker-compose.yml
File metadata and controls
69 lines (62 loc) · 1.64 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
63
64
65
66
67
68
69
services:
db:
image: postgres:14
environment:
- POSTGRES_USER=MusicPlayerUser
- POSTGRES_PASSWORD=Chippy
- POSTGRES_DB=MusicPlayerBackend
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5432"]
interval: 30s
timeout: 10s
retries: 5
web:
build: .
command: gunicorn music_player.wsgi:application --bind 0.0.0.0:8000 --access-logfile '-' --error-logfile '-'
volumes:
- .:/music_player
- ./media:/music_player/media
ports:
- "8000:8000"
depends_on:
- db
restart: on-failure
environment:
- UPLOADS_ENABLED=False
- PROD=True
- DB_NAME=MusicPlayerBackend
- DB_USER=MusicPlayerUser
- DB_PASSWORD=Chippy
- DB_HOST=db
- DB_PORT=5432
env_file:
- ./.env
user: "1000:1000"
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./static:/usr/src/app/static
- ./media:/music_player/media
- ./certbot/www/:/var/www/certbot
- ./certbot/conf:/etc/letsencrypt
depends_on:
- web
certbot:
image: certbot/certbot
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
command: certonly --webroot -w /var/www/certbot -d vergil.8261958.xyz --email pongopeter826@mail.com --agree-tos --no-eff-email --force-renewal
user: root
volumes:
postgres_data:
media: