diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..ab9c638 --- /dev/null +++ b/Containerfile @@ -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"] diff --git a/Makefile b/Makefile index 05eb344..c1e64d6 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..1c3c98d --- /dev/null +++ b/compose.yaml @@ -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