Add hosting guide

This commit is contained in:
Nyx 2025-03-23 03:03:39 -05:00
parent 3c37333606
commit 86a771aac2
5 changed files with 36 additions and 2 deletions

8
Dockerfile Normal file
View file

@ -0,0 +1,8 @@
FROM python:3-alpine
WORKDIR /utils
COPY . .
RUN pip install --no-cache-dir -r requirements-prod.txt
ENTRYPOINT [ "gunicorn", "-w", "4", "app.app", "--bind", "0.0.0.0:8000" ]

View file

@ -1,3 +1,17 @@
# utils
Flask app with a few utilities
Flask app with a few utilities.
## Hosting
Hosting this is easy:
- Clone the repo
```
git clone https://git.everypizza.im/n/utils.git
```
- Modify the port in `compose.yml` if needed
- Start the container:
```
podman compose up -d
```

9
compose.yml Normal file
View file

@ -0,0 +1,9 @@
services:
utils:
build:
dockerfile: Dockerfile
ports:
- "65193:8000" # Will listen on port 65193, change that number to change the port
restart: unless-stopped
volumes:
- ./utils:/utils

3
requirements-prod.txt Normal file
View file

@ -0,0 +1,3 @@
flask
bleach
gunicorn

View file

@ -1,2 +1,2 @@
flask
bleach
bleach