mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-08 22:14:53 +03:00
-Disable traefik celery
- Added different ACME directory with correct persmissions so that it can be added as volume - ACME volume to reuse certificate by other containers
This commit is contained in:
parent
52ed5a5f29
commit
390f2c4a76
|
@ -1,3 +0,0 @@
|
|||
# Caddy
|
||||
# ------------------------------------------------------------------------------
|
||||
DOMAIN_NAME={{ cookiecutter.domain_name }}
|
|
@ -1,2 +1,5 @@
|
|||
FROM traefik
|
||||
FROM traefik:alpine
|
||||
RUN mkdir -p /etc/traefik/acme
|
||||
RUN touch /etc/traefik/acme/acme.json
|
||||
RUN chmod 600 /etc/traefik/acme/acme.json
|
||||
COPY ./compose/production/traefik/traefik.toml /etc/traefik
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
logLevel = "ERROR"
|
||||
logLevel = "DEBUG"
|
||||
defaultEntryPoints = ["http", "https"]
|
||||
|
||||
[web]
|
||||
# Port for the status page
|
||||
address = ":7080"
|
||||
address = ":8080"
|
||||
dashboard = true
|
||||
|
||||
# Entrypoints, http and https
|
||||
[entryPoints]
|
||||
|
@ -21,7 +22,7 @@ address = ":7080"
|
|||
[acme]
|
||||
# Email address used for registration
|
||||
email = "{{ cookiecutter.email }}"
|
||||
storageFile = "acme.json"
|
||||
storageFile = "/etc/traefik/acme/acme.json"
|
||||
entryPoint = "https"
|
||||
onDemand = false
|
||||
OnHostRule = true
|
||||
|
|
|
@ -3,6 +3,7 @@ version: '2'
|
|||
volumes:
|
||||
postgres_data: {}
|
||||
postgres_backup: {}
|
||||
traefik_acme: {}
|
||||
|
||||
services:
|
||||
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
||||
|
@ -20,7 +21,7 @@ services:
|
|||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.backend=django"
|
||||
- "traefik.frontend.rule={{ cookiecutter.domain_name }}"
|
||||
- "traefik.frontend.rule=Host:{{ cookiecutter.domain_name }}"
|
||||
- "traefik.port=5000"
|
||||
|
||||
postgres:
|
||||
|
@ -43,12 +44,11 @@ services:
|
|||
- django
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
# - ./traefik/traefik.toml:/etc/traefik/traefik.toml:ro
|
||||
# - ./traefik/acme:/etc/traefik/acme
|
||||
- traefik_acme:/etc/traefik/acme
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "7080:7080"
|
||||
- "8080:8080"
|
||||
|
||||
redis:
|
||||
image: redis:3.2
|
||||
|
|
Loading…
Reference in New Issue
Block a user