Skip to content

Commit fd8e66a

Browse files
committed
Use create-container-service-deployment for explicit redeployment
- Explicitly creates new deployment instead of updating parameters - Pulls latest :main images from GitHub Container Registry - Creates new deployment version in Lightsail console - Guarantees new deployment on every push
1 parent c44c1e4 commit fd8e66a

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

.github/workflows/docker.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,25 @@ jobs:
5050

5151
- name: Force Lightsail redeployment
5252
run: |
53-
# Force new deployment by toggling scale
54-
aws lightsail update-container-service \
53+
# Create new deployment to pull latest images
54+
aws lightsail create-container-service-deployment \
5555
--service-name sc-market \
5656
--region us-east-2 \
57-
--scale 1
57+
--containers '{
58+
"backend": {
59+
"image": "ghcr.io/sc-market/sc-market-backend:main",
60+
"ports": {"8080": "HTTP"}
61+
},
62+
"discord": {
63+
"image": "ghcr.io/sc-market/scmarketbot:main",
64+
"ports": {"3000": "HTTP"}
65+
}
66+
}' \
67+
--public-endpoint '{
68+
"containerName": "backend",
69+
"containerPort": 8080,
70+
"healthCheck": {
71+
"path": "/api/market/stats",
72+
"intervalSeconds": 30
73+
}
74+
}'

0 commit comments

Comments
 (0)