From d8ef285f15007ed8cffa8b0c0882245d5f417b28 Mon Sep 17 00:00:00 2001 From: Maxim Snesarev Date: Fri, 3 Apr 2026 02:32:47 +0300 Subject: [PATCH] Update justfile and docker-compose for improved production workflow - Added image reference for the app in docker-compose.yml. - Modified justfile to include new push and prod-pull commands for building and deploying the app image. - Updated prod-up command to pull the latest image before starting containers, enhancing deployment efficiency. --- docker/docker-compose.yml | 1 + justfile | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 069c38c..11cc3cc 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -45,6 +45,7 @@ services: " app: + image: git.oberonworks.ru/oberon/advdoors:latest build: context: .. dockerfile: docker/Dockerfile diff --git a/justfile b/justfile index 4bc061f..0d68b61 100644 --- a/justfile +++ b/justfile @@ -1,7 +1,8 @@ set dotenv-load := false -dev_compose := "docker/docker-compose.dev.yml" +dev_compose := "docker/docker-compose.dev.yml" prod_compose := "docker/docker-compose.yml" +image := "git.oberonworks.ru/oberon/advdoors:latest" # List available recipes default: @@ -80,9 +81,10 @@ db-reset: docker compose -f {{dev_compose}} up -d @echo "Database and MinIO volumes wiped. Restart dev server to re-create schema." -# Production: build and start all containers +# Production: pull latest image and start all containers prod-up: - docker compose -f {{prod_compose}} up -d --build + docker compose -f {{prod_compose}} pull app + docker compose -f {{prod_compose}} up -d # Production: stop prod-down: @@ -92,6 +94,16 @@ prod-down: prod-logs *args: docker compose -f {{prod_compose}} logs {{args}} +# Build app image and push to Gitea registry +push: + docker compose -f {{prod_compose}} build app + docker compose -f {{prod_compose}} push app + +# Production: pull latest image and restart app +prod-pull: + docker compose -f {{prod_compose}} pull app + docker compose -f {{prod_compose}} up -d app + # Show status of dev services status: docker compose -f {{dev_compose}} ps