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: |
|
||||
docker build -t chesco-site:latest -f docker/Dockerfile .
|
||||
|
||||
- name: Sync to Host Directory
|
||||
- name: Deploy Container
|
||||
run: |
|
||||
# Create the directory if it doesn't exist
|
||||
mkdir -p ~/chesco
|
||||
# We use direct docker commands here because they work over the socket
|
||||
# without needing files to be physically present on the host's disk.
|
||||
|
||||
# Copy the compose file to the host directory
|
||||
cp docker/docker-compose.yaml ~/chesco/docker-compose.yaml
|
||||
|
||||
- name: Deploy with Compose
|
||||
run: |
|
||||
# Move into the dedicated directory and restart the service
|
||||
cd ~/chesco
|
||||
docker compose up -d --force-recreate
|
||||
docker stop chesco-site || true
|
||||
docker rm chesco-site || true
|
||||
|
||||
docker run -d \
|
||||
--name chesco-site \
|
||||
--restart always \
|
||||
-p 8081:80 \
|
||||
chesco-site:latest
|
||||
|
||||
Reference in New Issue
Block a user