From f0da2bb2edb9b7e7f4a7aa7c3ef3874df1addb60 Mon Sep 17 00:00:00 2001 From: GauthierWebDev Date: Thu, 17 Apr 2025 14:33:15 +0200 Subject: [PATCH] fix: Update Docker compose command to build application --- .gitea/workflows/deploy.yaml | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index b3513c7..3e44f3d 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -34,26 +34,6 @@ jobs: ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && git pull origin main" echo "🚀 The main branch has been pulled on the VPS." - - name: Building the Docker services - env: - VPS_USER: ${{ secrets.VPS_USER }} - VPS_HOST: ${{ secrets.VPS_HOST }} - VPS_PATH: ${{ secrets.VPS_PATH }} - VPS_PORT: ${{ secrets.VPS_PORT }} - run: | - ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose build" - echo "📦 The services have been builded on the VPS." - - - name: Installing the dependencies - env: - VPS_USER: ${{ secrets.VPS_USER }} - VPS_HOST: ${{ secrets.VPS_HOST }} - VPS_PATH: ${{ secrets.VPS_PATH }} - VPS_PORT: ${{ secrets.VPS_PORT }} - run: | - ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose run --rm memento-dev install" - echo "📦 The dependencies has been installed." - - name: Building the application env: VPS_USER: ${{ secrets.VPS_USER }} @@ -61,19 +41,9 @@ jobs: VPS_PATH: ${{ secrets.VPS_PATH }} VPS_PORT: ${{ secrets.VPS_PORT }} run: | - ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose run --rm memento-dev build" + ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose -f compose-prod.yml build --no-cache" echo "📦 The application have been builded on the VPS." - - name: Stop the application - env: - VPS_USER: ${{ secrets.VPS_USER }} - VPS_HOST: ${{ secrets.VPS_HOST }} - VPS_PATH: ${{ secrets.VPS_PATH }} - VPS_PORT: ${{ secrets.VPS_PORT }} - run: | - ssh -i ~/.ssh/id_ed25519 -p $VPS_PORT $VPS_USER@$VPS_HOST "cd $VPS_PATH && docker compose down" - echo "🚀 The application has been started on the VPS." - - name: Start the application env: VPS_USER: ${{ secrets.VPS_USER }}