docker-compose.yml 1.19 KB
Newer Older
1
2
3
version: '3'
services:
  codimd-db:
4
    image: postgres:12-alpine
5
6
7
8
9
10
11
12
13
14
    container_name: codimd-db
    networks:
      - codimd
    volumes:
      - codimd-db:/var/lib/postrgresql/data
      - /etc/localtime:/etc/localtime:ro
    env_file: ./secrets/codimd-db.secrets.example
    restart: always

  codimd-app:
15
    image: registry.picasoft.net/pica-codimd:2.2.0
16
17
18
19
20
21
22
23
24
    build: .
    container_name: codimd-app
    volumes:
      - codimd-data:/home/codimd/app/public/uploads
    depends_on:
      - codimd-db
    env_file: ./secrets/codimd-db.secrets.example
    environment:
      - CMD_USECDN=false
25
      - CMD_DOMAIN=codimd.picasoft.net
26
27
28
29
30
31
32
33
34
      - 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
35
      traefik.http.routers.codimd-app.rule: Host(`codimd.picasoft.net`)
36
37
38
39
40
41
42
43
      traefik.http.services.codimd-app.loadbalancer.server.port: 3000
      traefik.enable: true
    restart: always

networks:
  proxy:
    external: true
  codimd:
44
    name: "codimd"
45
46
47
48
49
50

volumes:
  codimd-db:
    external: true
  codimd-data:
    external: true