From 0039135f5172ab7072b51abce0cdc10daaa26354 Mon Sep 17 00:00:00 2001 From: Augusto Date: Sat, 2 Mar 2024 15:11:29 +0100 Subject: [PATCH] Undo release changes and adding extra information to the README.md --- .github/workflows/release.yml | 3 --- README.md | 14 +++++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d6b51cd..b6efb135 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -116,8 +116,6 @@ jobs: name: Deploy over SSH runs-on: ubuntu-latest needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp] - env: - IP_HOST: ${{ secrets.DEPLOY_HOST }} steps: - name: Deploy over SSH uses: fifsky/ssh-action@master @@ -128,6 +126,5 @@ jobs: command: | wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/docker-compose.yml -O docker-compose.yml wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/.env -O .env - export DOCKER_HOST_IP=$IP_HOST docker compose --profile prod down docker compose --profile prod up -d diff --git a/README.md b/README.md index df6abf16..75939c09 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,19 @@ sudo curl -L "https://github.com/docker/compose/releases/download/1.28.5/docker- sudo chmod +x /usr/local/bin/docker-compose ``` +After installing Docker, we need to set up a global environment variable to configure external container connectivity. This can be done by editing the /etc/environment file: + +```bash +sudo nano /etc/environment +``` + +and adding the following line: + +```bash +DOCKER_HOST_IP=[IP address of the remote machine] +``` + + ### Continuous delivery (GitHub Actions) Once we have our machine ready, we could deploy by hand the application, taking our docker-compose file and executing it in the remote machine. @@ -108,7 +121,6 @@ deploy: command: | wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/docker-compose.yml -O docker-compose.yml wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/.env -O .env - export DOCKER_HOST_IP=${{ secrets.DEPLOY_HOST }} docker compose --profile prod down docker compose --profile prod up -d ```