Refactor Docker configuration in deployment workflow and compose file
All checks were successful
Build and Deploy Blog / build-and-deploy-local (push) Successful in 41s
All checks were successful
Build and Deploy Blog / build-and-deploy-local (push) Successful in 41s
This commit is contained in:
@@ -16,10 +16,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Rebuild and Deploy with Docker Compose
|
- name: Rebuild and Deploy with Docker Compose
|
||||||
run: |
|
run: |
|
||||||
# Use the host's Docker to build the image defined in docker-compose.yml
|
docker build --target release -t local/gabriel-blog:latest .
|
||||||
# The '--no-cache' flag ensures it picks up any changes from your repository
|
|
||||||
# The 'up -d' command will recreate only the services that have changed
|
|
||||||
# docker compose build
|
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
|
||||||
# Clean up any old, unused images to save disk space
|
# Clean up any old, unused images to save disk space
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
blog:
|
blog:
|
||||||
build:
|
image: local/gabriel-blog:latest
|
||||||
context: .
|
|
||||||
target: release
|
|
||||||
container_name: blog
|
container_name: blog
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
labels:
|
labels:
|
||||||
|
Reference in New Issue
Block a user