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:
11
Dockerfile
11
Dockerfile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user