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:
14
Containerfile
Normal file
14
Containerfile
Normal 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"]
|
||||
16
Makefile
16
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
|
||||
|
||||
13
compose.yaml
Normal file
13
compose.yaml
Normal 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
|
||||
Reference in New Issue
Block a user