fix CD
This commit is contained in:
parent
b4331b0fbd
commit
03e29a66f7
|
|
@ -22,13 +22,16 @@ jobs:
|
|||
docker push $IMAGE:staging-${{ github.sha }}
|
||||
docker push $IMAGE:staging-latest
|
||||
|
||||
- name: Deploy local
|
||||
- name: Deploy local (docker compose)
|
||||
env:
|
||||
IMAGE: ${{ secrets.REGISTRY_URL }}/${{ secrets.IMAGE_NAME }}
|
||||
CONTAINER_NAME: ${{ secrets.CONTAINER_NAME }}
|
||||
HOST_PORT: ${{ secrets.HOST_PORT }}
|
||||
run: |
|
||||
COMPOSE_FILE=/home/compmanage/docker-compose.yml
|
||||
OVERRIDE_FILE=/tmp/ttmt-frontend.override.yml
|
||||
cat > $OVERRIDE_FILE <<EOF
|
||||
services:
|
||||
frontend:
|
||||
image: $IMAGE:staging-${{ github.sha }}
|
||||
EOF
|
||||
docker pull $IMAGE:staging-${{ github.sha }}
|
||||
docker stop $CONTAINER_NAME || true
|
||||
docker rm $CONTAINER_NAME || true
|
||||
docker run -d --name $CONTAINER_NAME -p $HOST_PORT:80 $IMAGE:staging-${{ github.sha }}
|
||||
docker compose -f $COMPOSE_FILE -f $OVERRIDE_FILE up -d --no-deps --force-recreate frontend
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user