Skip to content

Commit

Permalink
move the dockerfile to root project pre-deploy step
Browse files Browse the repository at this point in the history
  • Loading branch information
nwaughachukwuma committed Nov 4, 2024
1 parent b5132bc commit cf01b05
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
- run: |
cp ./app/.dockerignore .dockerignore
cp ./app/.gcloudignore .gcloudignore
cp ./app/Dockerfile Dockerfile
- id: deploy
uses: google-github-actions/deploy-cloudrun@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
- run: |
cp ./server/.dockerignore .dockerignore
cp ./server/.gcloudignore .gcloudignore
cp ./server/Dockerfile Dockerfile
- name: Deploy to Cloud Run
id: deploy
Expand Down
5 changes: 3 additions & 2 deletions app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ RUN apt-get -yqq update && apt-get -yqq install \
pkg-config \
python3-dev \
xclip \
xsel \
xselect \
&& rm -rf /var/lib/apt/lists/*

COPY . ./
# RUN rm -rf ./server

# Install production dependencies.
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install pycairo

ENV HOST '0.0.0.0'
EXPOSE $PORT
HEALTHCHECK CMD curl --fail http://$HOST:$PORT/_stcore/health

CMD exec streamlit run app/index.py --server.port=$PORT --server.address=$HOST
CMD exec streamlit run app.py --server.port=$PORT --server.address=$HOST
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[project]
# Support Python 3.10+.
requires-python = ">=3.10"

[tool.ruff]
Expand Down
1 change: 1 addition & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ COPY . ./

# Install production dependencies.
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install pycairo

ENV HOST '0.0.0.0'
ENV WORKER 4
Expand Down

0 comments on commit cf01b05

Please sign in to comment.