Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
shaheennabi committed Dec 21, 2024
1 parent 0be4091 commit 1d7bd73
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
groups
whoami
docker ps
- name: Build Docker Image
run: |
docker build -t streamlit-app \
--build-arg OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} \
--build-arg WEATHER_API_KEY=${{ secrets.WEATHER_API_KEY }} \
--build-arg SERPER_API_KEY=${{ secrets.SERPER_API_KEY }} \
--build-arg AMADEUS_API_KEY=${{ secrets.AMADEUS_API_KEY }} \
--build-arg AMADEUS_API_SECRET=${{ secrets.AMADEUS_API_SECRET }} .
--build-arg OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY }}" \
--build-arg WEATHER_API_KEY="${{ secrets.WEATHER_API_KEY }}" \
--build-arg SERPER_API_KEY="${{ secrets.SERPER_API_KEY }}" \
--build-arg AMADEUS_API_KEY="${{ secrets.AMADEUS_API_KEY }}" \
--build-arg AMADEUS_API_SECRET="${{ secrets.AMADEUS_API_SECRET }}" .
- name: Authenticate to AWS ECR
uses: aws-actions/configure-aws-credentials@v4
Expand Down
21 changes: 14 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ COPY . .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Load environment variables from GitHub secrets
ENV OPENAI_API_KEY=$OPENAI_API_KEY
ENV WEATHER_API_KEY=$WEATHER_API_KEY
ENV SERPER_API_KEY=$SERPER_API_KEY
ENV AMADEUS_API_KEY=$AMADEUS_API_KEY
ENV AMADEUS_API_SECRET=$AMADEUS_API_SECRET
# Define build arguments
ARG OPENAI_API_KEY
ARG WEATHER_API_KEY
ARG SERPER_API_KEY
ARG AMADEUS_API_KEY
ARG AMADEUS_API_SECRET

# Set environment variables from build arguments
ENV OPENAI_API_KEY=${OPENAI_API_KEY}
ENV WEATHER_API_KEY=${WEATHER_API_KEY}
ENV SERPER_API_KEY=${SERPER_API_KEY}
ENV AMADEUS_API_KEY=${AMADEUS_API_KEY}
ENV AMADEUS_API_SECRET=${AMADEUS_API_SECRET}

# Expose the port Streamlit uses
EXPOSE 8501

# Run Streamlit app
CMD ["streamlit", "run", "deployment/app.py", "--server.port=8501", "--server.address=0.0.0.0"]
CMD ["streamlit", "run", "deployment/app.py", "--server.port=8501", "--server.address=0.0.0.0"]

0 comments on commit 1d7bd73

Please sign in to comment.