diff --git a/.gitea/workflows/build-and-deploy.yaml b/.gitea/workflows/build-and-deploy.yaml index e24e17a..27badd3 100644 --- a/.gitea/workflows/build-and-deploy.yaml +++ b/.gitea/workflows/build-and-deploy.yaml @@ -9,11 +9,6 @@ jobs: - name: Check out repository code uses: actions/checkout@v3 - name: Build Docker image - run: docker build -t ${{ vars.IMAGE_TAG }} . + run: docker build -t maciejpedzi.ch:latest . - name: Rerun website's Docker container - env: - CONTAINER_NAME: ${{ vars.CONATINER_NAME }} - NETWORK_NAME: ${{ vars.NETWORK_NAME }} - PORT_PAIR: ${{ vars.PORT_PAIR }} - IMAGE_TAG: ${{ vars.IMAGE_TAG }} run: chmod +x ./rerun-container.sh && ./rerun-container.sh diff --git a/rerun-container.sh b/rerun-container.sh index 46659b0..7e37dbc 100644 --- a/rerun-container.sh +++ b/rerun-container.sh @@ -1,5 +1,5 @@ #!/usr/bin/sh -docker stop $CONTAINER_NAME && \ -docker container rm $(docker ps -aqf "name=$CONTAINER_NAME") && \ -docker run -d -p $PORT_PAIR --netwok $NETWORK_NAME --name $CONTAINER_NAME $IMAGE_TAG +docker stop my_website && \ +docker container rm $(docker ps -aqf "name=my_website") && \ +docker run -d -p 8505:80 --netwok my_network --name my_website maciejpedzi.ch:latest