-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose-local-ssl.yml
58 lines (52 loc) · 1.63 KB
/
docker-compose-local-ssl.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
54
55
56
57
58
version: '3.9'
# NOTE: paste fullchain.pem and privkey.pem in compose/ssl folder + check permissions
services:
traefik:
image: "traefik:v2.10"
container_name: "traefik"
networks:
- traefik-network
command:
- "--api.insecure=true"
- "--api.dashboard=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.file.directory=/traefik_dynamic"
- "--providers.file.watch=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
- "--entrypoints.websecure.address=:443"
# Add other Traefik-specific settings here
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./compose/ssl:/certs:ro
- ./compose/traefik-ssl.yml:/traefik_dynamic/traefik-ssl.yaml:ro
django:
depends_on:
- traefik
- postgres
environment:
- DJANGO_SETTINGS_MODULE=tigaserver_project.settings_dev_ssl
networks:
- traefik-network
- postgres-network
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-network"
- "traefik.http.routers.django.rule=Host(`webserver.mosquitoalert.com`)"
- "traefik.http.routers.django.entrypoints=websecure"
- "traefik.http.routers.django.tls=true"
postgres:
networks:
- postgres-network
networks:
traefik-network:
external: true
postgres-network:
external: true