From fcecd197106daf616ab6764c21636a8fceac3c19 Mon Sep 17 00:00:00 2001 From: snowcatridge10 Date: Sat, 3 Jun 2023 11:36:06 -0400 Subject: [PATCH] add docker --- Dockerfile | 12 ++++++++++++ README.md | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e70c00c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +# syntax=docker/dockerfile:1 + +FROM python:3.9-slim-buster + +WORKDIR /indestructables + +COPY requirements.txt requirements.txt +RUN pip3 install -r requirements.txt + +COPY . . + +CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"] \ No newline at end of file diff --git a/README.md b/README.md index 78bbfe8..81da630 100644 --- a/README.md +++ b/README.md @@ -12,15 +12,23 @@ An open source alternative front-end to Instructables None, yet! # Run your own instance -## Dependencies + +## Step by step installation + +### Dependencies `pip3 install -r requirements.txt`. For the production environment, you also need the uWSGI Python3 plugin. On Debian, it can be installed via `apt install uwsgi-plugin-python3` -## Production +### Production 1. Clone the repository 2. Run `uwsgi --plugin python3 --http-socket 0.0.0.0:8002 --wsgi-file main.py --callable app --processes 4 --threads 2` 3. Point your reverse proxy to http://localhost:8002 -## Development +### Development 1. Clone the repository 2. Run `python3 main.py` -3. Connect to http://localhost:8002 \ No newline at end of file +3. Connect to http://localhost:8002 + +## Docker installation + +`docker build --tag indestructables .` +`docker run -d -p 5000:5000 indestructables` \ No newline at end of file