add hackmd postgre

This commit is contained in:
2022-04-22 17:27:54 +08:00
parent e3e1459775
commit bb1a6aeb94

View File

@@ -0,0 +1,37 @@
version: "3"
services:
database:
container_name: postgres
image: postgres:13
environment:
- POSTGRES_USER=codimd
- POSTGRES_PASSWORD=change_password
- POSTGRES_DB=codimd
volumes:
- ./data/postgres:/var/lib/postgresql/data
restart: unless-stopped
networks:
nginx:
aliases:
- postgres
codimd:
container_name: hackmd
image: hackmdio/hackmd:2.4.1
environment:
- CMD_DB_URL=postgres://codimd:change_password@postgres/codimd
- CMD_USECDN=false
depends_on:
- database
ports:
- "3000:3000"
volumes:
- ./data/hackmd:/home/hackmd/app/public/uploads
restart: unless-stopped
networks:
nginx:
aliases:
- hackmd
networks:
nginx:
external: true