2021-03-04 09:11:16 +00:00
|
|
|
# Using version 3 to provide play-with-docker badge
|
|
|
|
# You can change to version 2 without breaking.
|
|
|
|
#version: '2'
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
networks:
|
|
|
|
webproxy:
|
|
|
|
external: true
|
|
|
|
|
|
|
|
backend-hedgedoc:
|
|
|
|
external: true
|
|
|
|
|
|
|
|
services:
|
|
|
|
database:
|
|
|
|
# Don't upgrade PostgreSQL by simply changing the version number
|
|
|
|
# You need to migrate the Database to the new PostgreSQL version
|
|
|
|
image: postgres:9.6-alpine
|
|
|
|
container_name: hedgedoc-db
|
|
|
|
#mem_limit: 256mb # version 2 only
|
|
|
|
#memswap_limit: 512mb # version 2 only
|
|
|
|
#read_only: true # not supported in swarm mode please enable along with tmpfs
|
|
|
|
#tmpfs:
|
|
|
|
# - /run/postgresql:size=512K
|
|
|
|
# - /tmp:size=256K
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=${POSTGRES_USER}
|
|
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
|
|
- POSTGRES_DB=${POSTGRES_DB}
|
|
|
|
volumes:
|
|
|
|
- /opt/appdata/hedgedoc/db:/var/lib/postgresql/data
|
|
|
|
networks:
|
2021-03-04 09:26:37 +00:00
|
|
|
- backend-hedgedoc
|
2021-03-04 09:11:16 +00:00
|
|
|
restart: always
|
|
|
|
|
|
|
|
app:
|
|
|
|
# Uncomment the following section to build the image yourself:
|
|
|
|
#build:
|
|
|
|
# context: .
|
|
|
|
# dockerfile: debian/Dockerfile
|
|
|
|
# args:
|
|
|
|
# - "VERSION=master"
|
|
|
|
# - "HEDGEDOC_REPOSITORY=https://github.com/hedgedoc/hedgedoc.git"
|
|
|
|
image: quay.io/hedgedoc/hedgedoc:1.7.2
|
|
|
|
container_name: hedgedoc
|
|
|
|
#mem_limit: 256mb # version 2 only
|
|
|
|
#memswap_limit: 512mb # version 2 only
|
|
|
|
#read_only: true # not supported in swarm mode, enable along with tmpfs
|
|
|
|
#tmpfs:
|
|
|
|
# - /tmp:size=10M
|
|
|
|
# # Make sure you remove this when you use filesystem as upload type
|
|
|
|
# - /hedgedoc/public/uploads:size=10M
|
|
|
|
environment:
|
|
|
|
# DB_URL is formatted like: <databasetype>://<username>:<password>@<hostname>:<port>/<database>
|
|
|
|
# Other examples are:
|
|
|
|
# - mysql://hedgedoc:password@database:3306/hedgedoc
|
|
|
|
# - sqlite:///data/sqlite.db (NOT RECOMMENDED)
|
|
|
|
# - For details see the official sequelize docs: http://docs.sequelizejs.com/en/v3/
|
|
|
|
# - CMD_DB_URL=postgres://hedgedoc:password@database:5432/hedgedoc
|
|
|
|
- CMD_DOMAIN=md.bmen.cc
|
|
|
|
- CMD_URL_ADDPORT=false
|
|
|
|
- CMD_PROTOCOL_USESSL=true
|
|
|
|
#- CMD_EMAIL=false
|
|
|
|
- CMD_ALLOW_EMAIL_REGISTER=false
|
|
|
|
- CMD_ALLOW_ANONYMOUS=false
|
|
|
|
- CMD_ALLOW_ANONYMOUS_EDITS=true
|
|
|
|
- CMD_DEFAULT_PERMISSION=limited
|
|
|
|
- CMD_IMAGE_UPLOAD_TYPE=filesystem
|
|
|
|
- CMD_DB_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@codimd-db:5432/${POSTGRES_DB}
|
|
|
|
- CMD_ALLOW_PDF_EXPORT=true
|
|
|
|
- CMD_ALLOW_FREEURL=true
|
|
|
|
volumes:
|
|
|
|
- /opt/appdata/hedgedoc/uploads:/hedgedoc/public/uploads
|
2021-03-04 09:24:37 +00:00
|
|
|
# ports:
|
2021-03-04 09:11:16 +00:00
|
|
|
# Ports that are published to the outside.
|
|
|
|
# The latter port is the port inside the container. It should always stay on 3000
|
|
|
|
# If you only specify a port it'll published on all interfaces. If you want to use a
|
|
|
|
# local reverse proxy, you may want to listen on 127.0.0.1.
|
|
|
|
# Example:
|
|
|
|
# - "127.0.0.1:3000:3000"
|
|
|
|
# - "3000:3000"
|
|
|
|
networks:
|
|
|
|
- webproxy
|
2021-03-04 09:26:37 +00:00
|
|
|
- backend-hedgedoc
|
2021-03-04 09:11:16 +00:00
|
|
|
restart: always
|
|
|
|
depends_on:
|
|
|
|
- database
|