Fly config:
app = "k1insights"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[build]
build-target = "deploy"
[env]
K1_DATA_DB = "/data/k1.db"
K1_KART_LOOKBACK = 14
K1_LOCATION_LOOKBACK = 7
K1_POOL_SIZE = 100
K1_TASK_LIMIT = 20
K1_USER_LOOKBACK = 30
[mounts]
source = "k1data"
destination = "/data"
[[services]]
http_checks = []
internal_port = 5000
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
[experimental]
allowed_public_ports = []
auto_rollback = true
Dockerfile:
# syntax=docker/dockerfile:1
FROM python:3.8-slim-bullseye AS base
RUN apt-get update && apt-get -y upgrade && apt-get -y install git
FROM base AS compile
WORKDIR /app
RUN pip install -U build
COPY .git/ ./.git/
COPY LICENSE.md pyproject.toml supervisord.conf ./
COPY src/ ./src/
RUN python -m build -w
FROM base AS deploy
EXPOSE 5000
RUN useradd -m -G tty fakeuser && mkdir /data && chown fakeuser:fakeuser /data
VOLUME ["/data"]
WORKDIR /home/fakeuser
USER fakeuser
ENV PATH="/home/fakeuser/.local/bin:$PATH"
RUN pip install gunicorn supervisor
COPY --from=compile /app/dist/*.whl /app/supervisord.conf ./
RUN pip install *.whl
ENTRYPOINT (k1-create-db ${K1_DATA_DB} || true) && k1-start-all
flyctl deploy
logs:
[...]
[Warning] One or more build-args [build-target] were not consumed
What am I doing wrong?