/joplin-server-docker-compose

A Docker Compose Workflow for deploying Joplin Server, the file sync web service for Joplin, a notebook/notetaking application

Docker Compose Workflow for Joplin Server

Table of Contents

About

Joplin is an open-source note-taking/notebook app which allows synchronization of notebook data to a number of various sources, including its own self-hosted web service. This then, is a Docker Compose workflow which can be used to deploy Joplin Server as a stack of microservices (Joplin Server, PostgreSQL, Caddy).

Getting Started

This workflow is meant to be deployed remotely, through the use of Docker Contexts, the set up for which is shown below.

Prerequisites

  • Docker
  • Docker Compose

Production Deployment

  1. Clone this repo onto the machine you'll be deploying Joplin onto.
  2. Set up your deployment target as a Docker Context:
docker context create joplin-prod \
    --default-stack-orchestrator=swarm \
    --docker host=ssh://<user>@<host>
  1. Fill out the details in ./environment/joplin.env
  2. Update the server_name directives along with the paths to the Certbot-issued SSL information in the included Nginx config file (./nginx/joplin.conf) with the correct hostname.
  3. Once all these options are set, bring up the service stack using the following command:
DOCKER_CONTEXT=joplin-prod POSTGRES_PASSWD=<password> docker-compose up -d

Development

NOTE: All the steps for Development are the same except for the following:

  1. Use the default local docker context instead of the remote one
  2. Change the ENVIRONMENT variable in ./config/joplin.env to development
  3. Deploy the stack using the following command:
POSTGRES_PASSWD=<password>

Notes

  • For more information on Docker Contexts, check the official documentation

  • This deployment stack is also published as a Docker App on Docker Hub (TODO)

  • the development