From bb1a6aeb945298e062efb5191bb8b8df6370db42 Mon Sep 17 00:00:00 2001 From: fghwett <1058178245@qq.com> Date: Fri, 22 Apr 2022 17:27:54 +0800 Subject: [PATCH] add hackmd postgre --- hackmd/docker-compose-postgres.yml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 hackmd/docker-compose-postgres.yml diff --git a/hackmd/docker-compose-postgres.yml b/hackmd/docker-compose-postgres.yml new file mode 100644 index 0000000..6fed073 --- /dev/null +++ b/hackmd/docker-compose-postgres.yml @@ -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 \ No newline at end of file