Skip to content

Commit

Permalink
Bugfix - Fix Dockerfile for production
Browse files Browse the repository at this point in the history
The dockerfile didn't copy the dialogflow directory so Ote wasn't able to work :(
  • Loading branch information
hanschrome committed Mar 21, 2023
1 parent f218824 commit 448d254
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build-deploy-docker.yml
Expand Up @@ -14,10 +14,16 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Add SSH key
uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: docker/prod/Dockerfile
push: true
tags: hanschrome/solidjobs-web:latest
args: |
--build-arg SSH_PRIVATE_KEY="${{ secrets.SSH_PRIVATE_KEY }}"
5 changes: 5 additions & 0 deletions docker/prod/Dockerfile
Expand Up @@ -12,6 +12,11 @@ COPY profile_image.php dist/api/index.php
FROM php:7.1 AS php_build
RUN apt-get update && apt-get install -y git
WORKDIR /app
RUN mkdir -p /root/.ssh && \
chmod 700 /root/.ssh && \
ssh-keyscan github.com >> /root/.ssh/known_hosts && \
echo "${SSH_PRIVATE_KEY}" > /root/.ssh/id_rsa && \
chmod 600 /root/.ssh/id_rsa
RUN git clone git@github.com:solidjobs/ote-dialogflow-client.git dist/dialogflow
WORKDIR /app/dist/dialogflow
RUN php composer.phar install
Expand Down

0 comments on commit 448d254

Please sign in to comment.