Skip to content

Commit

Permalink
Merge pull request #13 from ebmdatalab/fix-deploy
Browse files Browse the repository at this point in the history
Fix deploy
  • Loading branch information
ghickman authored Nov 8, 2023
2 parents 0c6ab02 + 83fd4f4 commit 9597acf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,26 @@ jobs:
name: metrics-image
path: /tmp/metrics.tar.gz

deploy:
required-checks:
if: always()

needs:
- check
- test
- docker-test-and-build
- lint-dockerfile

runs-on: Ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}

deploy:
needs: [required-checks]

runs-on: ubuntu-latest

permissions:
Expand Down Expand Up @@ -121,20 +134,3 @@ jobs:
ssh-add - <<< "${{ secrets.DOKKU3_DEPLOY_SSH_KEY }}"
SHA=$(docker inspect --format='{{index .RepoDigests 0}}' "$PUBLIC_IMAGE_NAME":latest)
ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" [email protected] git:from-image metrics "$SHA"
required-checks:
if: always()

needs:
- check
- test
- docker-test-and-build
- lint-dockerfile

runs-on: Ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
18 changes: 11 additions & 7 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,27 @@ services:
extends:
service: metrics-prod
image: metrics-dev
container_name: metrics-dev
# running as a specific uid/gid allows files written to mounted volumes by
# the docker container's default user to match the host user's uid/gid, for
# convienience.
user: ${DEV_USERID:-1000}:${DEV_GROUPID:-1000}
build:
# the dev stage in the Dockerfile
target: metrics-dev
# pass the uid/gid as build arg
args:
- DEV_USERID=${DEV_USERID:-1000}
- DEV_GROUPID=${DEV_GROUPID:-1000}
container_name: metrics-dev
# running as a specific uid/gid allows files written to mounted volumes by
# the docker container's default user to match the host user's uid/gid, for
# convienience.
user: ${DEV_USERID:-1000}:${DEV_GROUPID:-1000}
volumes:
# mount our current code
- .:/app
env_file:
- .env
environment:
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
- SLACK_SIGNING_SECRET=${SLACK_SIGNING_SECRET:-}
- SLACK_TECH_SUPPORT_CHANNEL_ID=${SLACK_TECH_SUPPORT_CHANNEL_ID:-}
- SLACK_TOKEN=${SLACK_TOKEN:-}
- TIMESCALEDB_URL=${TIMESCALEDB_URL:-}

volumes:
postgres:
Expand Down

0 comments on commit 9597acf

Please sign in to comment.