-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.persist.yml
36 lines (34 loc) · 1.58 KB
/
docker-compose.persist.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
version: "3.5"
services:
django:
restart: always
volumes:
- ./data/media:/app/media
- ./log:/app/log
labels:
- "io.yourlabs.compose.mkdir=./data/media,./log:1000:1000:0750"
- "traefik.http.middlewares.${CI_PROJECT_SLUG}-${CI_ENVIRONMENT_SLUG}-redirect.redirectregex.regex=^https?://${HOST}/(.*)"
- "traefik.http.middlewares.${CI_PROJECT_SLUG}-${CI_ENVIRONMENT_SLUG}-redirect.redirectregex.replacement=https://www.${HOST}/$${1}"
- "traefik.http.routers.${CI_PROJECT_SLUG}-${CI_ENVIRONMENT_SLUG}-ssl.middlewares=${CI_PROJECT_SLUG}-${CI_ENVIRONMENT_SLUG}-redirect"
- "traefik.http.routers.${CI_PROJECT_SLUG}-${CI_ENVIRONMENT_SLUG}-ssl.entryPoints=websecure"
- "traefik.http.routers.${CI_PROJECT_SLUG}-${CI_ENVIRONMENT_SLUG}-ssl.rule=host(`${HOST}`, `www.${HOST}`)"
- "traefik.http.routers.${CI_PROJECT_SLUG}-${CI_ENVIRONMENT_SLUG}-ssl.tls=true"
- "traefik.http.routers.${CI_PROJECT_SLUG}-${CI_ENVIRONMENT_SLUG}-ssl.tls.certResolver=leresolver"
- "traefik.http.routers.${CI_PROJECT_SLUG}-${CI_ENVIRONMENT_SLUG}-ssl.service=${CI_PROJECT_SLUG}-${CI_ENVIRONMENT_SLUG}-ssl"
- "traefik.http.services.${CI_PROJECT_SLUG}-${CI_ENVIRONMENT_SLUG}-ssl.loadBalancer.server.port=8000"
- "traefik.docker.network=web"
networks:
- web
- default
postgres:
restart: always
networks:
- default
volumes:
- ./data/postgres:/var/lib/postgresql/data
- ./dump:/dump
labels:
- "io.yourlabs.compose.mkdir=./dump,./data/postgres,./log/postgres:999:999:0700"
networks:
web:
external: true