docker stuff

This commit is contained in:
Alexandru 2024-09-17 20:12:09 +03:00
parent 926da5a6cd
commit 9c49356153
4 changed files with 29 additions and 1 deletions

13
Dockerfile Normal file
View File

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

View File

@ -1,2 +1,3 @@
# guestbook
A guestbook made in Python.
A guestbook made in Python. Made for embedding into other webpages.
![](https://fzorb.xyz/i/c69ud.png)

10
docker-compose.yml Normal file
View File

@ -0,0 +1,10 @@
services:
web:
build:
context: .
ports:
- "44324:5000"
volumes:
- ./guestbook.db:/app/guestbook.db
environment:
- FLASK_ENV=production

4
wsgi.py Normal file
View File

@ -0,0 +1,4 @@
from app import app
if __name__ == "__main__":
app.run()