Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: published static file location #397

Merged
merged 3 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
cache-dependency-path: "**/pyproject.toml"

- name: Create /static directory
run: mkdir -p eligibility_server/static
run: mkdir -p static

- name: Write python packages to file
run: |
Expand All @@ -60,10 +60,10 @@ jobs:
pip install pipdeptree
pip install -e .
pipdeptree
pipdeptree >> eligibility_server/static/requirements.txt
pipdeptree >> static/requirements.txt

- name: Write commit SHA to file
run: echo "${{ github.sha }}" >> eligibility_server/static/sha.txt
run: echo "${{ github.sha }}" >> static/sha.txt

- name: Docker Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ __pycache__/
config/*
!config/sample.py
eligibility_server.egg-info
static/
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ RUN python -m pip install --upgrade pip
COPY . .
RUN git config --global --add safe.directory /build

RUN mkdir -p static

# build as root user so unnecessary files are not copied into tarball
USER root
RUN pip install build && python -m build
Expand All @@ -19,6 +21,7 @@ WORKDIR /home/calitp/app
ENV FLASK_APP=eligibility_server.app:app

COPY --from=build_wheel /build/dist /build/dist
COPY --from=build_wheel /build/static static

# copy source files
COPY bin bin
Expand Down
Loading