From 40f0b317a66f28436838db9bfd1b28b9141f13f4 Mon Sep 17 00:00:00 2001 From: mtoohey31 Date: Sun, 27 Dec 2020 18:31:10 -0500 Subject: [PATCH] Added Dockerfile and instructions for running a standalone container --- Dockerfile | 8 ++++++++ README.md | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5cd54d8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM python:3-alpine + +WORKDIR /build +COPY requirements.txt build_repo.py ./ + +RUN pip3 install -r requirements.txt + +ENTRYPOINT python3 build_repo.py diff --git a/README.md b/README.md index 911fee5..6b1c4bc 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,25 @@ https://your-domain.com/extensions/index.json ``` * Import the above endpoint into the web/desktop client. (Note: Enable CORS for your web server respectively, nginx setup provided below) +### Docker + +* To via Docker, clone the repository, set up the .env file, and optionally modify the `extensions` directory, following the instructions above. +* Next, build the container: + +```bash +$ docker build -t standardnotes-extensions . +``` + +* Then run the container, specifying the mount points for the `.env` file, the `extensions` directory, and the `public` directory, where the output will be placed: + +```bash +$ docker run \ + -v $PWD/.env:/build/.env \ + -v $PWD/extensions:/build/extensions \ + -v $PWD/public:/build/public \ + standardnotes-extensions +``` + ### Setup with nginx ```nginx