docker-compose.yml 743 Bytes
Newer Older
BoHong Li's avatar
BoHong Li committed
1
version: "3"
2
3
services:
  database:
BoHong Li's avatar
BoHong Li committed
4
    image: postgres:11.5
5
    environment:
BoHong Li's avatar
BoHong Li committed
6
7
8
9
10
11
      - POSTGRES_USER=codimd
      - POSTGRES_PASSWORD=change_password
      - POSTGRES_DB=codimd
    volumes:
      - "database-data:/var/lib/postgresql/data"
    restart: always
12
  codimd:
13
14
    # you can use image or custom build below
    # image: nabo.codimd.dev/hackmdio/hackmd:1.4.0
15
    build:
BoHong Li's avatar
BoHong Li committed
16
      context: ..
17
18
      dockerfile: ./deployments/Dockerfile
    environment:
BoHong Li's avatar
BoHong Li committed
19
20
21
22
      - CMD_DB_URL=postgres://codimd:change_password@database/codimd
      - CMD_USECDN=false
    depends_on:
      - database
23
    ports:
BoHong Li's avatar
BoHong Li committed
24
25
26
27
28
29
30
      - "3000:3000"
    volumes:
      - upload-data:/home/hackmd/app/public/uploads
    restart: always
volumes:
  database-data: {}
  upload-data: {}