diff --git a/.github/workflows/build-deliver.yaml b/.github/workflows/build-deliver.yaml index 504507b6..08a18880 100644 --- a/.github/workflows/build-deliver.yaml +++ b/.github/workflows/build-deliver.yaml @@ -19,7 +19,7 @@ jobs: - name: Publish to GitHub Container Registry # TODO: pin to hash - uses: elgohr/Publish-Docker-Github-Action@master + uses: elgohr/Publish-Docker-Github-Action@main with: name: ${{ github.repository }} registry: ghcr.io @@ -33,3 +33,5 @@ jobs: # create docker image tags to match git tags tag_names: true buildargs: VERSION_STRING + # cache layers that have not changed between builds (eg dependencies) + cache: true diff --git a/Dockerfile b/Dockerfile index cf42517a..17672847 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,14 @@ FROM python:3.7 WORKDIR /opt/app -ARG VERSION_STRING -ENV VERSION_STRING=$VERSION_STRING - COPY requirements.txt . RUN pip install --requirement requirements.txt COPY . . +ARG VERSION_STRING +ENV VERSION_STRING=$VERSION_STRING + ENV FLASK_APP=isacc_messaging.app:create_app() \ PORT=8000