From 765777bf61ef25f318a4ec8c1c5173d73b52142c Mon Sep 17 00:00:00 2001 From: "azykov@mail.ru" Date: Thu, 23 Apr 2026 12:28:51 +0300 Subject: [PATCH] joplin --- caddy/config/Caddyfile | 8 ++++++ joplin/compose.yaml | 59 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 joplin/compose.yaml diff --git a/caddy/config/Caddyfile b/caddy/config/Caddyfile index 1aaa2bf..18e088b 100644 --- a/caddy/config/Caddyfile +++ b/caddy/config/Caddyfile @@ -138,3 +138,11 @@ quest.aggtaa.com { output file /var/log/caddy/quest.aggtaa.com.log } } + +notes.aggtaa.com { + + reverse_proxy joplin_app:22300 + log { + output file /var/log/caddy/notes.aggtaa.com.log + } +} diff --git a/joplin/compose.yaml b/joplin/compose.yaml new file mode 100644 index 0000000..525f6e9 --- /dev/null +++ b/joplin/compose.yaml @@ -0,0 +1,59 @@ +# This is a sample docker-compose file that can be used to run Joplin Server +# along with a PostgreSQL server. +# +# Update the following fields in the stanza below: +# +# POSTGRES_USER +# POSTGRES_PASSWORD +# APP_BASE_URL +# +# APP_BASE_URL: This is the base public URL where the service will be running. +# - If Joplin Server needs to be accessible over the internet, configure APP_BASE_URL as follows: https://example.com/joplin. +# - If Joplin Server does not need to be accessible over the internet, set the APP_BASE_URL to your server's hostname. +# For Example: http://[hostname]:22300. The base URL can include the port. +# APP_PORT: The local port on which the Docker container will listen. +# - This would typically be mapped to port to 443 (TLS) with a reverse proxy. +# - If Joplin Server does not need to be accessible over the internet, the port can be mapped to 22300. + + +services: + + app: + image: joplin/server:latest + container_name: joplin_app + restart: always + depends_on: + - db + ports: + - "22300:22300" + environment: + - APP_PORT=22300 + - APP_BASE_URL=https://notes.aggtaa.com + - DB_CLIENT=pg + - POSTGRES_DATABASE=joplin + - POSTGRES_USER=joplin + - POSTGRES_PASSWORD=VZa8MBSuJHkzcGoowmJH1gzO8fCOU3zY + # - POSTGRES_PORT=${POSTGRES_PORT} + - POSTGRES_HOST=db + networks: + - net + - caddy_default + + db: + image: postgres:16 + container_name: joplin_db + restart: always + volumes: + - /docker/data/joplin/db:/var/lib/postgresql/data + environment: + - POSTGRES_DB=joplin + - POSTGRES_USER=joplin + - POSTGRES_PASSWORD=VZa8MBSuJHkzcGoowmJH1gzO8fCOU3zY + networks: + - net + +networks: + net: + internal: true + caddy_default: + external: true \ No newline at end of file