Giter VIP home page Giter VIP logo

docker-joplin-server's Introduction

docker-joplin-server

Docker Pulls

A Docker Image to run Joplin Server.

Joplin Server

You can find more information about Joplin on their website or Github.

Environment Variables

Please note the change of JOPLIN_BASE_URL and JOPLIN_PORT to the new APP_ environment variables from version 1.6.4 to 1.7!

Environment Variable Required Example Value Description
APP_BASE_URL Yes https://joplin.your.domain The URL where your Joplin Instance will be served from
APP_PORT Yes 22300 The port on which your Joplin instance will be running
DB_CLIENT No pg Use pg for postgres.
POSTGRES_PASSWORD No joplin Postgres DB password
POSTGRES_DATABASE No joplin Postgres DB name
POSTGRES_USER No joplin Postgres Username
POSTGRES_PORT No 5432 Postgres DB port
POSTGRES_HOST No db Postgres DB Host

Usage

I would recommend using a frontend webserver to run Joplin over HTTPS.

Generic docker-compose.yml

This is a barebones docker-compose example. It is recommended to use a webserver in front of the instance to run it over HTTPS. See the example below using Traefik.

version: '3'
services:
    app:
        environment:
            - APP_BASE_URL=http://joplin.yourdomain.tld:22300
            - APP_PORT=22300
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_DATABASE=joplin
            - POSTGRES_USER=joplin 
            - POSTGRES_PORT=5432 
            - POSTGRES_HOST=db
            - DB_CLIENT=pg
        restart: unless-stopped
        image: florider89/joplin-server:latest
        ports:
            - "22300:22300"
    db:
        restart: unless-stopped
        image: postgres:13.1
        ports:
            - "5432:5432"
        volumes:
            - /foo/bar/joplin-data:/var/lib/postgresql/data
        environment:
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_DB=joplin

Traefik docker-compose.yml

The following docker-compose.yml will make Joplin Server run and apply the labels to expose itself to Traefik.

Note that there are 2 networks in the example below, one to talk to traefik (traefik_default) and one between the Joplin Server and the Database, ensuring that these hosts are not exposed.

You may need to double check the entrypoint name (websecure) and certresolver (lewildcardresolver) to match your Traefik configuration

version: '3'

services:
    app:
        environment:
            - APP_BASE_URL=https://joplin.yourdomain.tld
            - APP_PORT=22300
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_DATABASE=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_PORT=5432
            - POSTGRES_HOST=db
            - DB_CLIENT=pg
        restart: unless-stopped
        image: florider89/joplin-server:latest
        networks:
            - internal
            - traefik_default
        labels:
            - "traefik.enable=true"
            - "traefik.http.routers.joplin.rule=Host(`joplin.yourdomain.tld`)"
            - "traefik.http.routers.joplin.entrypoints=websecure"
            - "traefik.http.routers.joplin.tls=true"
            - "traefik.http.routers.joplin.tls.certresolver=lewildcardresolver"
            - "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto = http"
            - "traefik.http.routers.joplin.service=joplin-server"
            - "traefik.http.services.joplin-server.loadbalancer.passhostheader=true"
            - "traefik.http.services.joplin-server.loadbalancer.server.port=22300"
            - "traefik.docker.network=traefik_default"
    db:
        restart: unless-stopped
        image: postgres:13.1
        networks:
            - internal
        volumes:
            - /foo/bar/joplin-data:/var/lib/postgresql/data
        environment:
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_DB=joplin
networks:
  internal:
    internal: true
  traefik_default:
    external: true

Tags

Currently there is only one version as there is no release yet for the server.

latest: Latest server release as per recommended Dockerfile.

latest-alpine: EXPERIMENTAL builds using Alpine of latest release.

master[-alpine]: Images built testing CI / Image changes. Should not be used on systems you want to have a working instance of Joplin Server on. Currently V2 Beta - see notice at the top!

Contribute

Feel free to contribute to this Docker image on Github.

docker-joplin-server's People

Contributors

dependabot[bot] avatar etho201 avatar flosoft avatar plamola avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.