feat: add Containerfile and compose.yaml for podman

Alpine-based image (59MB), source and config bind-mounted via
compose.yaml. Host networking for access to local Tor nodes.
This commit is contained in:
user
2026-02-15 03:42:59 +01:00
parent 57d2d87424
commit 61c580a555
3 changed files with 42 additions and 1 deletions

14
Containerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM python:3.13-alpine
RUN pip install --no-cache-dir pyyaml>=6.0
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONPATH=/app/src
EXPOSE 1080
ENTRYPOINT ["python", "-m", "s5p"]
CMD ["-c", "/app/config/s5p.yaml"]

View File

@@ -1,4 +1,6 @@
.PHONY: install test lint clean
APP_NAME := s5p
.PHONY: install test lint clean build up down logs
install:
pip install -e .
@@ -12,3 +14,15 @@ lint:
clean:
rm -rf build/ dist/ src/*.egg-info
find . -type d -name __pycache__ -exec rm -rf {} +
build:
podman-compose build
up:
podman-compose up -d
down:
podman-compose down
logs:
podman-compose logs -f

13
compose.yaml Normal file
View File

@@ -0,0 +1,13 @@
services:
s5p:
build:
context: .
dockerfile: Containerfile
container_name: s5p
restart: unless-stopped
ports:
- "127.0.0.1:1080:1080"
volumes:
- ./src:/app/src:ro,Z
- ./config/s5p.yaml:/app/config/s5p.yaml:ro,Z
network_mode: host