mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
Docker.fromwheel: more completely _from wheel_
Before this commit, the COPY command was still used to copy-over 2 files from
the working dir. Alhtough this was probably fine in practice (docker build
typically happens from a checked out state that matches the wheel you're
docker-building) it's not what's on the tin ("from wheel") and it opens up
the possiblity of subtle bugs (file mismatches when building from a different
state). Better prevent those.
This commit is contained in:
@@ -51,4 +51,4 @@ RUN ["bugsink-manage", "migrate", "snappea", "--database=snappea"]
|
||||
|
||||
HEALTHCHECK CMD python -c 'import requests; requests.get("http://localhost:8000/health/ready").raise_for_status()'
|
||||
|
||||
CMD [ "monofy", "bugsink-manage", "check", "--deploy", "--fail-level", "WARNING", "&&", "bugsink-manage", "migrate", "&&", "bugsink-manage", "prestart", "&&", "gunicorn", "--config", "gunicorn.docker.conf.py", "--bind=0.0.0.0:$PORT", "--access-logfile", "-", "bugsink.wsgi", "|||", "bugsink-runsnappea"]
|
||||
CMD [ "monofy", "bugsink-manage", "check", "--deploy", "--fail-level", "WARNING", "&&", "bugsink-manage", "migrate", "&&", "bugsink-manage", "prestart", "&&", "gunicorn", "--config", "bugsink/gunicorn.docker.conf.py", "--bind=0.0.0.0:$PORT", "--access-logfile", "-", "bugsink.wsgi", "|||", "bugsink-runsnappea"]
|
||||
|
||||
@@ -70,8 +70,8 @@ COPY dist/$WHEEL_FILE /wheels/
|
||||
RUN --mount=type=cache,target=/var/cache/buildkit/pip \
|
||||
pip install /wheels/$WHEEL_FILE
|
||||
|
||||
COPY bugsink/conf_templates/docker.py.template bugsink_conf.py
|
||||
COPY gunicorn.docker.conf.py /app/
|
||||
RUN cp /usr/local/lib/python3.12/site-packages/bugsink/conf_templates/docker.py.template /app/bugsink_conf.py && \
|
||||
cp /usr/local/lib/python3.12/site-packages/bugsink/gunicorn.docker.conf.py /app/gunicorn.docker.conf.py
|
||||
|
||||
RUN ["bugsink-manage", "migrate", "snappea", "--database=snappea"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user