From 9a394e5025f1d5e1f143ba2eba42322575eceb61 Mon Sep 17 00:00:00 2001 From: Sn0wed1 <45251800+Sn0wed1@users.noreply.github.com> Date: Thu, 3 Sep 2020 15:27:08 -0500 Subject: [PATCH 1/2] Adds a Dockerfile --- Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e4d1f9f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3 + +WORKDIR /usr/src/app + +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +RUN flask db init +RUN flask db migrate +RUN flask db upgrade + +CMD flask run --host 0.0.0.0 +EXPOSE 5000 From d4bc7f5a6179eca8c18adf4c2c69ff4816a9a94d Mon Sep 17 00:00:00 2001 From: Sn0wed1 <45251800+Sn0wed1@users.noreply.github.com> Date: Thu, 3 Sep 2020 15:44:43 -0500 Subject: [PATCH 2/2] Update README.md Updates README.md to include instructions for Docker. --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index e435607..1a6078b 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,26 @@ You can test this new version. 9. Go to "http://localhost:5000/" and enjoy. +### Using Docker: +A quick deployment + +1. Install Docker: + - `https://docs.docker.com/engine/install/` + +2. Clone this repository: + - `git clone https://github.com/pluja/Yotter.git` + +3. Navigate to the project folder: + - `cd Yotter` + +4. Build the docker image: + - `docker build -t yotter .` + +5. Run the container: + - `docker run -p 5000:5000 yotter` + +6. Go to "http://localhost:5000/" and enjoy. + ### 🔗 Hosting on a server: `SOON`