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