diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 1c4cf00..5f0c7da 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -190,8 +190,11 @@ jobs: # Stop and remove old container docker compose -f $COMPOSE_FILE down || true - # Start new container - docker compose -f $COMPOSE_FILE up -d + # Remove old images to force using new one + docker image prune -f + + # Start new container with force recreate + docker compose -f $COMPOSE_FILE up -d --force-recreate # Wait for health check echo "Waiting for application to be healthy..." diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 9e8454b..cd415ae 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,8 +1,6 @@ services: portfolio: - build: - context: . - dockerfile: Dockerfile + image: ghcr.io/denshooter/my_portfolio:production container_name: portfolio-app restart: unless-stopped ports: