Update docker-compose-prod.yml #202
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push containers to ghcr | |
env: | |
DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
DOCKER_PASS: ${{ secrets.DOCKER_PASS }} | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git clone on our repo | |
uses: actions/checkout@v2 | |
- name: Login to Dockerhub | |
working-directory: ${{ github.workspace }}/docker-stack/golem-reputation-backend | |
run: make login | |
- name: Build Containers | |
working-directory: ${{ github.workspace }}/docker-stack/golem-reputation-backend | |
run: make build-amd64 | |
- name: Push Containers | |
working-directory: ${{ github.workspace }}/docker-stack/golem-reputation-backend | |
run: make push-amd64 | |
- name: Deploy to Asia reputation instance | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.MAIN_HOST }} | |
username: ${{ secrets.MAIN_USERNAME }} | |
key: ${{ secrets.MAIN_KEY }} | |
port: ${{ secrets.PORT }} | |
script: | | |
docker service update --force --image ghcr.io/golemfactory/golem-reputation-backend:${{ github.sha }} reputation_django | |
docker service update --force --image ghcr.io/golemfactory/golem-reputation-backend-celery-yagna:${{ github.sha }} reputation_benchmarker_worker | |
docker service update --force --image ghcr.io/golemfactory/golem-reputation-backend-celery:${{ github.sha }} reputation_celery | |
docker service update --force --image ghcr.io/golemfactory/golem-reputation-backend-celery-beat:${{ github.sha }} reputation_celery_beat | |
docker service update --force --image ghcr.io/golemfactory/golem-reputation-backend-celery-yagna:${{ github.sha }} reputation_uptime_worker | |
docker service update --force --image ghcr.io/golemfactory/golem-reputation-backend-celery-yagna:${{ github.sha }} reputation_ping_worker | |
docker service update --force --image ghcr.io/golemfactory/golem-reputation-backend-celery-yagna:${{ github.sha }} reputation_ping_worker_p2p | |
docker image prune -f | |