# This is a sample docker-compose file that can be used to run Joplin Server # along with a PostgreSQL server. # # All environment variables are optional. If you don't set them, you will get a # warning from docker-compose, however the app should use working defaults. version: '3' services: db: image: postgres:13 volumes: - ./data/postgres:/var/lib/postgresql/data:z restart: unless-stopped environment: - POSTGRES_PASSWORD=posgres - POSTGRES_USER=posgres - POSTGRES_DB=posgres networks: - internal app: container_name: joplin image: joplin/server:latest depends_on: - db ports: - "22300:22300" restart: unless-stopped environment: - APP_PORT=22300 - APP_BASE_URL=https://notes.pukeko.xyz - DB_CLIENT=pg - POSTGRES_PASSWORD=posgres - POSTGRES_DATABASE=posgres - POSTGRES_USER=posgres - POSTGRES_PORT=5432 - POSTGRES_HOST=db networks: - network - internal - dns_network dns: - 150.201.34.6 labels: - "traefik.enable=true" - "traefik.docker.network=joplin_network" - "traefik.http.routers.joplin.entrypoints=websecure" - "traefik.http.routers.joplin.rule=Host(`notes.pukeko.xyz`)" - "traefik.http.routers.joplin.tls.certresolver=pukekoresolver" # - "traefik.http.routers.joplin.middlewares=authelia@docker" #Useless - webUI does nothing and Authelia bothers the API. networks: network: driver: bridge internal: driver: bridge dns_network: external: true