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).
This workflow is meant to be deployed remotely, through the use of Docker Contexts, the set up for which is shown below.
- Docker
- Docker Compose
- Clone this repo onto the machine you'll be deploying Joplin onto.
- Set up your deployment target as a Docker Context:
docker context create joplin-prod \
--default-stack-orchestrator=swarm \
--docker host=ssh://<user>@<host>
- Fill out the details in
./environment/joplin.env
- 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. - 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
NOTE: All the steps for Development are the same except for the following:
- Use the default local docker context instead of the remote one
- Change the
ENVIRONMENT
variable in./config/joplin.env
todevelopment
- Deploy the stack using the following command:
POSTGRES_PASSWD=<password>
-
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