Simplify deployment to direct docker run for containerized runners
Build and Deploy / deploy (push) Failing after 39s
Build and Deploy / deploy (push) Failing after 39s
This commit is contained in:
@@ -15,16 +15,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker build -t chesco-site:latest -f docker/Dockerfile .
|
docker build -t chesco-site:latest -f docker/Dockerfile .
|
||||||
|
|
||||||
- name: Sync to Host Directory
|
- name: Deploy Container
|
||||||
run: |
|
run: |
|
||||||
# Create the directory if it doesn't exist
|
# We use direct docker commands here because they work over the socket
|
||||||
mkdir -p ~/chesco
|
# without needing files to be physically present on the host's disk.
|
||||||
|
|
||||||
# Copy the compose file to the host directory
|
docker stop chesco-site || true
|
||||||
cp docker/docker-compose.yaml ~/chesco/docker-compose.yaml
|
docker rm chesco-site || true
|
||||||
|
|
||||||
- name: Deploy with Compose
|
docker run -d \
|
||||||
run: |
|
--name chesco-site \
|
||||||
# Move into the dedicated directory and restart the service
|
--restart always \
|
||||||
cd ~/chesco
|
-p 8081:80 \
|
||||||
docker compose up -d --force-recreate
|
chesco-site:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user