Skip to content

Instantly share code, notes, and snippets.

@svengo
Created May 9, 2023 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svengo/106b28a474dd6d6c1446c4db2e529689 to your computer and use it in GitHub Desktop.
Save svengo/106b28a474dd6d6c1446c4db2e529689 to your computer and use it in GitHub Desktop.
docker-compose.yml for Joplin
version: '2'
services:
db:
image: postgres:15-alpine
environment:
- TZ=Europe/Berlin
- POSTGRES_DB=joplin
- POSTGRES_USER=joplin
- POSTGRES_PASSWORD=secret
networks:
- default
volumes:
- db:/var/lib/postgresql/data
restart: unless-stopped
joplin:
image: joplin/server:latest
depends_on:
- db
networks:
- default
- web
environment:
- TZ=Europe/Berlin
- DB_CLIENT=pg
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=joplin
- POSTGRES_USER=joplin
- POSTGRES_PASSWORD=secret
- APP_PORT=22300
- APP_BASE_URL=https://joplin.example.com
- MAILER_ENABLED=1
- MAILER_HOST=mail.example.com
- MAILER_PORT=465
- MAILER_SECURE=1
- MAILER_AUTH_USER=joplin@example.com
- MAILER_AUTH_PASSWORD=secret
- MAILER_NOREPLY_NAME=Joplin
- MAILER_NOREPLY_EMAIL=joplin@example.com
labels:
- "traefik.enable=true"
- "traefik.http.routers.joplin.entrypoints=websecure"
- "traefik.http.routers.joplin.rule=Host(`joplin.example.com`)"
- "traefik.http.routers.joplin.service=joplin"
- "traefik.http.routers.joplin.tls.certresolver=default"
- "traefik.http.routers.joplin.tls.options=cloudflare@file"
- "traefik.http.routers.joplin.middlewares=coudflare-whitelist@file"
- "traefik.http.services.joplin.loadbalancer.server.port=22300"
restart: unless-stopped
volumes:
db:
networks:
default:
internal: true
web:
name: traefik_web
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment