mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-21 22:08:48 +00:00
Dockerfile - include version.env to image
This commit is contained in:
parent
e89401dbc1
commit
7eddb17862
@ -24,9 +24,12 @@ deploy:
|
||||
stage: deploy
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
before_script:
|
||||
- source version.env
|
||||
- Building docker image for commit "${COMMIT}" with version "${VERSION}"
|
||||
script:
|
||||
- docker login -u $PUBLIC_REGISTRY_USER -p $PUBLIC_REGISTRY_TOKEN
|
||||
- docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:${CI_BUILD_REF}
|
||||
- docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:${VERSION}
|
||||
- docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:latest
|
||||
- docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:${CI_BUILD_REF}
|
||||
- docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:${VERSION}
|
||||
- docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:latest
|
||||
|
@ -11,6 +11,7 @@ RUN apk update \
|
||||
&& apk del build-deps
|
||||
|
||||
COPY app /app
|
||||
COPY version.env /app/version.env
|
||||
COPY README.md /README.md
|
||||
|
||||
HEALTHCHECK --start-period=30s --interval=10s --timeout=5s --retries=3 CMD curl --insecure --fail https://localhost/status || exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user