mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 02:06:29 -05:00
docs: add docker compose deployment
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
d7af10e4f4
commit
180ab897ec
4 changed files with 80 additions and 0 deletions
19
docker/.env
Normal file
19
docker/.env
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Base settings
|
||||
HD_BASE_URL="https://hedgedoc2.localhost"
|
||||
HD_SESSION_SECRET="session_secret"
|
||||
|
||||
# Database settings
|
||||
HD_DATABASE_TYPE="postgres"
|
||||
HD_DATABASE_HOST="db"
|
||||
HD_DATABASE_PORT="5432"
|
||||
HD_DATABASE_NAME="hedgedoc"
|
||||
HD_DATABASE_USER="hedgedoc"
|
||||
HD_DATABASE_PASS="password"
|
||||
|
||||
# Uploads
|
||||
HD_MEDIA_BACKEND="filesystem"
|
||||
HD_MEDIA_BACKEND_FILESYSTEM_UPLOAD_PATH="uploads/"
|
||||
|
||||
# Auth
|
||||
HD_AUTH_LOCAL_ENABLE_LOGIN="true"
|
||||
HD_AUTH_LOCAL_ENABLE_REGISTER="true"
|
3
docker/.env.license
Normal file
3
docker/.env.license
Normal file
|
@ -0,0 +1,3 @@
|
|||
SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
|
||||
SPDX-License-Identifier: CC0-1.0
|
20
docker/Caddyfile
Normal file
20
docker/Caddyfile
Normal file
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
#
|
||||
|
||||
{$HD_BASE_URL}
|
||||
|
||||
log {
|
||||
output stdout
|
||||
level WARN
|
||||
format console
|
||||
}
|
||||
|
||||
reverse_proxy /realtime http://backend:3000
|
||||
reverse_proxy /api/* http://backend:3000
|
||||
reverse_proxy /public/* http://backend:3000
|
||||
reverse_proxy /uploads/* http://backend:3000
|
||||
reverse_proxy /apidoc/* http://backend:3000
|
||||
reverse_proxy /* http://frontend:3001
|
38
docker/docker-compose.yml
Normal file
38
docker/docker-compose.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
# SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
---
|
||||
services:
|
||||
backend:
|
||||
image: ghcr.io/hedgedoc/hedgedoc/backend:develop
|
||||
volumes:
|
||||
- $PWD/.env:/usr/src/app/backend/.env
|
||||
- hedgedoc_uploads:/usr/src/app/backend/uploads
|
||||
|
||||
frontend:
|
||||
image: ghcr.io/hedgedoc/hedgedoc/frontend:develop
|
||||
environment:
|
||||
HD_BASE_URL: "${HD_BASE_URL}"
|
||||
|
||||
db:
|
||||
image: postgres:15
|
||||
environment:
|
||||
POSTGRES_USER: "${HD_DATABASE_USER}"
|
||||
POSTGRES_PASSWORD: "${HD_DATABASE_PASS}"
|
||||
POSTGRES_DB: "${HD_DATABASE_NAME}"
|
||||
|
||||
proxy:
|
||||
image: caddy:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
HD_BASE_URL: "${HD_BASE_URL}"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "443:443/udp"
|
||||
volumes:
|
||||
- $PWD/Caddyfile:/etc/caddy/Caddyfile
|
||||
- caddy_data:/data
|
||||
|
||||
volumes:
|
||||
hedgedoc_uploads:
|
||||
caddy_data:
|
Loading…
Reference in a new issue