From 4b01764cbe68cd041ea7884541f243646fe20804 Mon Sep 17 00:00:00 2001 From: mtoohey31 Date: Sun, 27 Dec 2020 19:39:06 -0500 Subject: [PATCH] Added notes on docker-compose --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 6b1c4bc..8144483 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,36 @@ $ docker run \ standardnotes-extensions ``` +#### Docker Compose + +If you would like to use the container with docker-compose, the exact setup will be somewhat specific to your configuration, however the following snippet may be helpful, assuming you have cloned this repository in your `$HOME` directory and followed the instructions regarding the .env file and `extensions` directory: + +```yaml +version: '3.3' +services: + nginx: + ... + volumes: + - standardnotes-extensions:/usr/share/nginx/html + + standardnotes-extensions: + build: + context: $HOME/standardnotes-extensions/ + restart: "no" + volumes: + - $HOME/standardnotes-extensions/.env:/build/.env + - $HOME/standardnotes-extensions/extensions:/build/extensions + - standardnotes-extensions:/build/public + +volumes: + standardnotes-extensions: + name: standardnotes-extensions +``` + +This snippet will handle the building of the extension creation-container, and place the result in the `standardnotes-extensions` volume, which can then be mounted in the nginx container so that it can be served as demonstrated in the instructions below. + +Please note that the confiuration snippet above is in no way a complete setup: you will still have to configure the nginx container and set up the syncing server containers. + ### Setup with nginx ```nginx