simplify container: skip db prep, password via env var, fixed server IP

- start.sh: remove prepara_db.py step; load S3 creds via DuckDB init file
- Caddyfile: switch to basic_auth with {env.BASIC_AUTH_HASH} — no rebuild to rotate password
- Dockerfile: drop Python/pip layers (no longer needed at runtime)
- haloy.yml: set server to 89.167.95.136, add BASIC_AUTH_HASH to env
- remove requirements.txt (only needed for local prepara_db.py, not the container)
This commit is contained in:
2026-03-25 13:27:51 +01:00
parent 9eb2dee013
commit 0d77f83045
5 changed files with 19 additions and 23 deletions

View File

@@ -1,15 +1,9 @@
FROM debian:12-slim
ENV DEBIAN_FRONTEND=noninteractive
# System deps + Caddy
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
python3 python3-pip python3-venv \
curl ca-certificates unzip && \
# Caddy
curl -fsSL https://caddyserver.com/install.sh | bash && \
# DuckDB CLI
curl -fsSL \
"https://github.com/duckdb/duckdb/releases/latest/download/duckdb_cli-linux-amd64.zip" \
-o /tmp/duckdb.zip && \
@@ -20,10 +14,7 @@ RUN apt-get update -qq && \
WORKDIR /app
COPY requirements.txt .
RUN pip3 install --no-cache-dir --break-system-packages -r requirements.txt
COPY prepara_db.py Caddyfile start.sh ./
COPY basedosdados3.duckdb Caddyfile start.sh ./
RUN chmod +x start.sh
EXPOSE 8080