From 9c493561530175bd08f1b10f9bbf16c2c383d15d Mon Sep 17 00:00:00 2001 From: Alexandru Date: Tue, 17 Sep 2024 20:12:09 +0300 Subject: [PATCH] docker stuff --- Dockerfile | 13 +++++++++++++ README.md | 3 ++- docker-compose.yml | 10 ++++++++++ wsgi.py | 4 ++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 wsgi.py diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1730a24 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.11-slim + +WORKDIR /app + +COPY requirements.txt ./ + +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +EXPOSE 5000 + +CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app:app"]pr@docker1:/srv/wast \ No newline at end of file diff --git a/README.md b/README.md index def8150..53a6958 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # guestbook -A guestbook made in Python. \ No newline at end of file +A guestbook made in Python. Made for embedding into other webpages. +![](https://fzorb.xyz/i/c69ud.png) \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d0ceabe --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +services: + web: + build: + context: . + ports: + - "44324:5000" + volumes: + - ./guestbook.db:/app/guestbook.db + environment: + - FLASK_ENV=production diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..11e7de6 --- /dev/null +++ b/wsgi.py @@ -0,0 +1,4 @@ +from app import app + +if __name__ == "__main__": + app.run() \ No newline at end of file