Stop using entrypoints and remove entrypoint-based ci job

This commit is contained in:
Ana Custura 2022-12-06 12:24:11 +00:00 committed by irl
parent ebc9001aa1
commit bbcc451f65
2 changed files with 1 additions and 14 deletions

View file

@ -97,8 +97,6 @@ docker-build:
fi fi
- docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" . - docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" .
- docker push "$CI_REGISTRY_IMAGE${tag}" - docker push "$CI_REGISTRY_IMAGE${tag}"
- docker build --pull --target cron -t "$CI_REGISTRY_IMAGE:cron-$CI_COMMIT_BRANCH" .
- docker push "$CI_REGISTRY_IMAGE:cron-$CI_COMMIT_BRANCH"
# Run this job in a branch where a Dockerfile exists # Run this job in a branch where a Dockerfile exists
rules: rules:
- if: $CI_COMMIT_BRANCH - if: $CI_COMMIT_BRANCH

View file

@ -49,17 +49,6 @@ COPY . ${APP_BASE}/${APP}
RUN pip3 install -r requirements.txt RUN pip3 install -r requirements.txt
RUN pip3 install psycopg2-binary RUN pip3 install psycopg2-binary
# Set the entrypoint to the web app
ENTRYPOINT exec flask run
# Image for the cron service
FROM portal AS CRON
# Run as root
USER root USER root
# Setup the crontab
RUN crontab -u ${APP} docker-crontab RUN crontab -u ${APP} docker-crontab
# Set the entrypoint to the web app
# Entrypoint for the cron service
ENTRYPOINT [ "cron", "-f" ]