docker-compose.yml 1.93 KB
Newer Older
PICHOU Kyâne's avatar
PICHOU Kyâne committed
1
version: "3.7"
2
3
4
5
6
7
8
9
10

networks:
  proxy:
    external: true
  codimd:
    name: "codimd"

volumes:
  codimd-db:
PICHOU Kyâne's avatar
PICHOU Kyâne committed
11
    name: "codimd-db"
12
  codimd-data:
PICHOU Kyâne's avatar
PICHOU Kyâne committed
13
    name: "codimd-data"
14

15
16
services:
  codimd-db:
17
    image: postgres:12-alpine
18
19
20
21
    container_name: codimd-db
    networks:
      - codimd
    volumes:
22
      - codimd-db:/var/lib/postgresql/data
23
      - /etc/localtime:/etc/localtime:ro
24
25
    env_file: ./secrets/codimd-db.secrets
    restart: unless-stopped
26
27

  codimd-app:
28
    image: registry.picasoft.net/pica-codimd:2.3.2
29
30
31
32
33
34
    build: .
    container_name: codimd-app
    volumes:
      - codimd-data:/home/codimd/app/public/uploads
    depends_on:
      - codimd-db
35
    env_file: ./secrets/codimd-db.secrets
36
    environment:
Quentin Duchemin's avatar
Quentin Duchemin committed
37
      CMD_USECDN: "false"
38
      CMD_DOMAIN: md.picasoft.net
Quentin Duchemin's avatar
Quentin Duchemin committed
39
40
41
42
43
      CMD_ALLOW_ANONYMOUS: "true"
      CMD_ALLOW_ANONYMOUS_EDITS: "true"
      CMD_PROTOCOL_USESSL: "true"
      CMD_ALLOW_FREEURL: "true"
      CMD_CSP_ENABLE: "false"
44
45
      CMD_MATTERMOST_BASEURL: https://team.picasoft.net
      CMD_DEFAULT_PERMISSION: freely
46
47
48
      OLD_INTERVAL: "2 years"
      DB_HOST: "codimd-db"
      DB_PORT: 5432
49
      DELETE_AT: "0 0 * * *"
50
      CMD_ALLOW_PDF_EXPORT: "false"
51
52
53
54
55
    networks:
      - proxy
      - codimd
    labels:
      traefik.http.routers.codimd-app.entrypoints: websecure
56
      traefik.http.routers.codimd-app.rule: Host(`md.picasoft.net`)
57
58
59
60
61
62
      traefik.http.routers.codimd-app.service: codimd-app
      traefik.http.routers.codimd-metrics.entrypoints: websecure
      traefik.http.routers.codimd-metrics.rule: "Host(`md.picasoft.net`) && PathPrefix(`/metrics`)"
      traefik.http.routers.codimd-metrics.service: codimd-app
      traefik.http.routers.codimd-metrics.middlewares: "codimd-metrics-auth@docker"
      traefik.http.middlewares.codimd-metrics-auth.basicauth.users: "codimd:$$apr1$$dz9qOmSh$$3sj1zJ8/LhPFuKY5HReHd0"
63
64
      traefik.http.services.codimd-app.loadbalancer.server.port: 3000
      traefik.enable: true
65
    restart: unless-stopped