refactor(docker): use compose profiles instead of a prod override file
Collapse docker-compose.yml + docker-compose.prod.yml into one file with dev/prod profiles sharing a YAML anchor: dev builds from source, prod pulls ghcr latest. make up/prod select the profile; down passes both so it stops either. Drops the separate prod file and the !reset hack.
This commit is contained in:
12
Makefile
12
Makefile
@@ -51,14 +51,14 @@ ci-desktop: ## CI: cargo-check for @openconcho/desktop
|
||||
smoke-docker: ## Local: build the image + smoke-test the /api proxy (Docker required)
|
||||
bash docker/smoke-test.sh
|
||||
|
||||
up: ## Run the web container from source (dev-forward, builds) at :8080
|
||||
docker compose up -d --build
|
||||
up: ## Run the web container from source (dev profile, builds) at :8080
|
||||
docker compose --profile dev up -d --build
|
||||
|
||||
prod: ## Run the web container from the published image (pulls ghcr latest)
|
||||
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
|
||||
prod: ## Run the web container from the published image (prod profile, pulls latest)
|
||||
docker compose --profile prod up -d
|
||||
|
||||
down: ## Stop + remove the web container (works for dev or prod)
|
||||
docker compose down --remove-orphans
|
||||
down: ## Stop + remove the web container (either profile)
|
||||
docker compose --profile dev --profile prod down --remove-orphans
|
||||
|
||||
clean: down ## down + remove the locally built image
|
||||
-docker image rm openconcho-web:local
|
||||
|
||||
Reference in New Issue
Block a user