docker-compose.yml 1.2 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
38
    environment:
      - CMD_USECDN=false
39
      - CMD_DOMAIN=codimd.picasoft.net
40
41
42
43
44
45
46
47
48
      - CMD_ALLOW_ANONYMOUS=true
      - CMD_ALLOW_ANONYMOUS_EDITS=true
      - CMD_PROTOCOL_USESSL=true
      - CMD_CSP_ENABLE=false
    networks:
      - proxy
      - codimd
    labels:
      traefik.http.routers.codimd-app.entrypoints: websecure
49
      traefik.http.routers.codimd-app.rule: Host(`codimd.picasoft.net`)
50
51
      traefik.http.services.codimd-app.loadbalancer.server.port: 3000
      traefik.enable: true
52
    restart: unless-stopped