feat: build artifactapi container (#25)
All checks were successful
Deploy / build (push) Successful in 1m5s

- build artifactapi container

Reviewed-on: #25
This commit is contained in:
Ben Vincent 2026-01-07 00:01:50 +11:00
parent a1bd95caec
commit d753f686ff
3 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1 @@
docker

View File

@ -0,0 +1,22 @@
# almalinux/9.6/rpmbuilder
docker_source = "git.unkin.net/unkin/almalinux9-base:latest"
packages = [
"sudo"
]
scripts_post_packages = [
"git clone https://git.unkin.net/unkin/artifactapi.git /app/artifactapi && uv build --wheel /app/artifactapi",
"useradd -m -r -s /bin/sh appuser && chown -R appuser:appuser /app",
"sudo -u appuser uv tool install --from /app/artifactapi/dist/*.whl artifactapi",
]
scripts_final = [
"dnf clean all",
"rm -rf /var/cache/dnf"
]
docker_changes = [
"EXPOSE 8000",
"HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD curl -f http://localhost:8000/health || exit 1",
"USER appuser",
"ENV PATH=\"/home/appuser/.local/bin:$PATH\"",
"WORKDIR /app",
"CMD [\"artifactapi\"]"
]

View File

@ -0,0 +1 @@
20260106