diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 13b352d..af97de9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,6 +3,7 @@ on: push: branches: - test + jobs: build: runs-on: ubuntu-latest @@ -52,11 +53,5 @@ jobs: echo "Removing existing container..." docker rm myapp || true - echo "Writing .env file to apps/backend..." - mkdir -p apps/backend - cat < apps/backend/.env - ${{ secrets.ENV_FILE }} - EOF - echo "Running new container..." - docker run -d --name myapp -p 3000:3000 -p 8080:8080 ${{ secrets.DOCKER_HUB_USERNAME }}/myapp:latest + docker run -d --name myapp -p 3000:3000 -p 8080:8080 --env-file /root/src/config/.env ${{ secrets.DOCKER_HUB_USERNAME }}/myapp:latest