forked from amerkurev/django-docker-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.debug.yml
53 lines (50 loc) · 1.53 KB
/
docker-compose.debug.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
version: "3.9"
services:
postgres:
image: postgres:15
env_file: .env
restart: unless-stopped
volumes:
- "postgres-data:/var/lib/postgresql/data/"
django:
build: .
image: django-docker
env_file: .env
environment:
- "DJANGO_DEBUG=true"
restart: unless-stopped
command: ["/docker-cmd.sh", "--debug"]
volumes:
- "media-data:/var/www/media"
- "./website:/usr/src/website" # mount the source code for watching changes
depends_on:
- postgres
labels:
- "traefik.enable=true"
- "traefik.http.routers.development.rule=Host(`127.0.0.1`) || Host(`localhost`)"
- "traefik.http.routers.development.entrypoints=web"
reverse-proxy:
image: traefik:v2.9
env_file: .env
restart: unless-stopped
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.le-resolver.acme.httpchallenge=true"
- "--certificatesresolvers.le-resolver.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.le-resolver.acme.email=admin@yourdomain.com"
- "--certificatesresolvers.le-resolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
#- "8080:8080"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
volumes:
postgres-data:
media-data: