Skip to content

Commit

Permalink
remove unused context from gcloudignore
Browse files Browse the repository at this point in the history
  • Loading branch information
nwaughachukwuma committed Nov 4, 2024
1 parent 76c9d68 commit 0ee068b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ jobs:
- run: |
touch .dockerignore
echo "server/**" >> .dockerignore
touch .gcloudignore
echo "server/**" >> .gcloudignore
- id: deploy
uses: google-github-actions/deploy-cloudrun@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ jobs:
- run: |
touch .dockerignore
echo "app/**" >> .dockerignore
touch .gcloudignore
echo "app/**" >> .gcloudignore
- name: Deploy to Cloud Run
id: deploy
Expand Down
3 changes: 2 additions & 1 deletion app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ RUN apt-get -yqq update && apt-get -yqq install \
&& rm -rf /var/lib/apt/lists/*

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

# Install production dependencies.
RUN pip install --no-cache-dir -r requirements.txt
Expand All @@ -26,4 +27,4 @@ ENV HOST '0.0.0.0'
EXPOSE $PORT
HEALTHCHECK CMD curl --fail http://$HOST:$PORT/_stcore/health

CMD exec streamlit run index.py --server.port=$PORT --server.address=$HOST
CMD exec streamlit run app/index.py --server.port=$PORT --server.address=$HOST
4 changes: 3 additions & 1 deletion server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# https://hub.docker.com/_/python
FROM python:3.12-slim

# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True
ENV PYTHONDONTWRITEBYTECODE 1

Expand All @@ -17,6 +18,7 @@ RUN apt-get -yqq update && apt-get -yqq install \
&& rm -rf /var/lib/apt/lists/*

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

# Install production dependencies.
RUN pip install --no-cache-dir -r requirements.txt
Expand All @@ -28,4 +30,4 @@ ENV TIMEOUT 0

EXPOSE 8080

CMD exec gunicorn -k uvicorn.workers.UvicornWorker -b :$PORT -w $WORKER --threads $THREADS -t $TIMEOUT --preload src.main:app
CMD exec gunicorn -k uvicorn.workers.UvicornWorker -b :$PORT -w $WORKER --threads $THREADS -t $TIMEOUT --preload server.src.main:app

0 comments on commit 0ee068b

Please sign in to comment.