diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 722d030..80c8dd4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -44,8 +44,17 @@ jobs: key: ${{ secrets.SSHKEY }} passphrase: ${{ secrets.PASSPHRASE }} script: | - # Copy docker-compose.production.yml to the server - scp -r docker-compose.production.yml ${{ secrets.USERNAME }}@${{ secrets.HOST }}:~/ + # Create docker-compose.production.yml on the server + cat < docker-compose.production.yml + version: "3" + + services: + production-server: + image: ${{ env.DOCKER_REPO }}:latest + restart: always + ports: + - "80:80" + EOF # Install Docker curl -fsSL https://get.docker.com -o get-docker.sh @@ -62,4 +71,4 @@ jobs: docker pull ${{ env.DOCKER_REPO }}:latest # Run Docker Compose - docker-compose -f docker-compose.production.yml up --build --detach + docker-compose -f docker-compose.production.yml up -d