diff --git a/.github/workflows/deploy-staging.yaml b/.github/workflows/deploy-staging.yaml index 1272afd..1f2b819 100644 --- a/.github/workflows/deploy-staging.yaml +++ b/.github/workflows/deploy-staging.yaml @@ -5,6 +5,7 @@ on: push: branches: - "devops-fix" + - "staging" jobs: build_and_push: @@ -20,12 +21,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - # - name: Extract metadata (tags, labels) for Docker - # id: meta - # uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 - # with: - # images: my-docker-hub-namespace/my-docker-hub-repository - - name: Build and push Image id: push uses: docker/build-push-action@v4 @@ -109,5 +104,5 @@ jobs: port: ${{ secrets.SSH_PORT }} script: | cd susunjadwal/susunjadwal-backend-stg - sudo docker compose up + sudo docker compose up -d diff --git a/deploy-stg/docker-compose.yml b/deploy-stg/docker-compose.yml index a2b2bdf..07aef9a 100644 --- a/deploy-stg/docker-compose.yml +++ b/deploy-stg/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.9" services: - rmq-stg: + susunjadwal-backend-rmq-stg: image: rabbitmq:management-alpine restart: unless-stopped ports: @@ -9,7 +9,7 @@ services: networks: - public-web - mongo-stg: + susunjadwal-backend-mongo-stg: image: mongo:7 restart: unless-stopped environment: @@ -23,15 +23,16 @@ services: networks: - public-web - server-stg: + susunjadwal-backend-server-stg: + pull_policy: always image: ristekoss/susunjadwal-backend:staging labels: caddy: api-stg.susunjadwal.ristek.cs.ui.ac.id caddy.reverse_proxy: "{{upstreams 8006}}" restart: unless-stopped depends_on: - - rmq-stg - - mongo-stg + - susunjadwal-backend-rmq-stg + - susunjadwal-backend-mongo-stg # volumes: # - ./.env:/app/.env:ro env_file: