Added Dockerfile and instructions for running a standalone container

This commit is contained in:
mtoohey31
2020-12-27 18:31:10 -05:00
parent 7184f2aa8e
commit 40f0b317a6
2 changed files with 27 additions and 0 deletions

8
Dockerfile Normal file
View File

@@ -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

View File

@@ -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