docker-compose.yml 1.52 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
version: '3.7'

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

volumes:
  codimd-db:
    name: 'codimd-db'
  codimd-data:
    name: 'codimd-data'


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

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