CI: use specfic Containerfile for the runner to build the app image
This commit is contained in:
parent
01341a0cd9
commit
53c8996a3b
2 changed files with 15 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: container
|
runs-on: container
|
||||||
|
@ -26,7 +27,7 @@ jobs:
|
||||||
image: treetrail-srv
|
image: treetrail-srv
|
||||||
#tags: foo # v1 ${{ github.sha }}
|
#tags: foo # v1 ${{ github.sha }}
|
||||||
containerfiles: |
|
containerfiles: |
|
||||||
./Containerfile
|
./Containerfile.for_runner
|
||||||
|
|
||||||
- uses: actions/push-to-registry@v2
|
- uses: actions/push-to-registry@v2
|
||||||
with:
|
with:
|
||||||
|
|
13
Containerfile.for_runner
Normal file
13
Containerfile.for_runner
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# FIXME: do not use hardcoded registry
|
||||||
|
FROM tiptop:5000/trixie_python
|
||||||
|
WORKDIR /usr/src/treetrail
|
||||||
|
ENV PATH="/usr/src/treetrail/.venv/bin:$PATH"
|
||||||
|
ENV PYTHONPATH="/usr/src"
|
||||||
|
COPY --from=localhost/treetrail_backend_deps /usr/src/treetrail/.venv/ /usr/src/treetrail/.venv
|
||||||
|
COPY --from=localhost/treetrail_backend_deps /usr/local/treetrail/ /usr/local/treetrail
|
||||||
|
COPY ./treetrail ./pyproject.toml ./README.md .
|
||||||
|
|
||||||
|
# Instances should override the prod.yaml file
|
||||||
|
COPY ./prod.yaml /etc/treetrail/prod.yaml
|
||||||
|
|
||||||
|
CMD ["uvicorn", "treetrail.application:app", "--port", "8081", "--log-config", "logging.yaml", "--host", "0.0.0.0"]
|
Loading…
Add table
Add a link
Reference in a new issue