Port 3000 was already allocated by the previous container from the Next.js era. --remove-orphans only removes containers within the same compose project, so the old one survived. Explicitly stop+rm the named container before docker compose up so the port is always free. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,6 +40,11 @@ jobs:
|
|||||||
- name: Build Container
|
- name: Build Container
|
||||||
run: docker compose build
|
run: docker compose build
|
||||||
|
|
||||||
|
- name: Stop Existing Container
|
||||||
|
run: |
|
||||||
|
docker stop soroushasadi-site 2>/dev/null || true
|
||||||
|
docker rm soroushasadi-site 2>/dev/null || true
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: docker compose up -d --remove-orphans
|
run: docker compose up -d --remove-orphans
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user