This commit is contained in:
@@ -12,29 +12,29 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker build -t my-local-app:latest .
|
docker build -t my-local-app:latest .
|
||||||
|
|
||||||
- name: Remove Old Container
|
# - name: Remove Old Container
|
||||||
run: |
|
|
||||||
# Use '|| true' to force a success exit code even if the container is missing
|
|
||||||
docker stop my-running-app || true
|
|
||||||
docker rm my-running-app || true
|
|
||||||
|
|
||||||
- name: Start New Container
|
|
||||||
run: |
|
|
||||||
docker run -d \
|
|
||||||
--name my-running-app \
|
|
||||||
-p 5000:5000 \
|
|
||||||
--restart unless-stopped \
|
|
||||||
flask-app:latest
|
|
||||||
|
|
||||||
# - name: Deploy to CasaOS (Docker)
|
|
||||||
# run: |
|
# run: |
|
||||||
# # Stop and remove the old container if it exists
|
# # Use '|| true' to force a success exit code even if the container is missing
|
||||||
# docker stop my-running-app || true
|
# docker stop my-running-app || true
|
||||||
# docker rm my-running-app || true
|
# docker rm my-running-app || true
|
||||||
|
|
||||||
# # Run the new container
|
# - name: Start New Container
|
||||||
|
# run: |
|
||||||
# docker run -d \
|
# docker run -d \
|
||||||
# --name my-running-app \
|
# --name my-running-app \
|
||||||
# -p 9002:5005 \
|
# -p 5000:5000 \
|
||||||
# --restart always \
|
# --restart unless-stopped \
|
||||||
# my-local-app:latest
|
# flask-app:latest
|
||||||
|
|
||||||
|
- name: Deploy to CasaOS (Docker)
|
||||||
|
run: |
|
||||||
|
# Stop and remove the old container if it exists
|
||||||
|
docker stop my-running-app || true
|
||||||
|
docker rm my-running-app || true
|
||||||
|
|
||||||
|
# Run the new container
|
||||||
|
docker run -d \
|
||||||
|
--name my-running-app \
|
||||||
|
-p 9002:5005 \
|
||||||
|
--restart always \
|
||||||
|
my-local-app:latest
|
||||||
Reference in New Issue
Block a user