From b2fde84f8b95d53d7e5f076003226e93cbf0a553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Mon, 10 Aug 2020 08:51:56 +0200 Subject: [PATCH] feat: add docker-compose setup --- README.md | 20 ++++++++++++++++++++ docker-compose.yml | 11 +++++++++++ 2 files changed, 31 insertions(+) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index 41ce16e7e..00c0af8f1 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,12 @@ Questions? Find answers on our [Help page](https://standardnotes.org/help). --- +### Running with Docker image + +You can run the application by using our [official Docker image](https://hub.docker.com/r/standardnotes/web) + +Make sure you are using the appropriate tag for your use case. `develop` branch is tagged with `latest` and `master` branch is tagged with `stable`. + ### Running Locally This repo contains the core code used in the web app, as well as the Electron-based [desktop application](https://github.com/standardnotes/desktop). @@ -77,6 +83,20 @@ This repo contains the core code used in the web app, as well as the Electron-ba Then open your browser to `http://localhost:3001`. +### Running Locally with Docker + +To run the app locally with Docker, first build the image by running: +``` +docker-compose build +``` + +Then configure and start the application by typing: +``` +cp .env.sample .env +// adjust your config if needed +docker-compose up +``` + --- **Extensions Manager and Batch Manager:** diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..ac5a3a4b3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' +services: + app: + build: + context: . + env_file: .env + restart: unless-stopped + ports: + - ${PORT}:3001 + volumes: + - .:/app