mirror of
https://github.com/stellarshenson/stellars-jupyterhub-ds.git
synced 2026-03-08 06:00:29 +00:00
feat: add stop target to makefile
- Add stop target to gracefully stop and remove containers - Respects compose_override.yml if present - Stops containers without removing images or volumes
This commit is contained in:
11
Makefile
11
Makefile
@@ -4,7 +4,7 @@
|
||||
# GLOBALS #
|
||||
#################################################################################
|
||||
.DEFAULT_GOAL := help
|
||||
.PHONY: help build push start clean increment_version tag
|
||||
.PHONY: help build push start stop clean increment_version tag
|
||||
|
||||
# Include project configuration
|
||||
include project.env
|
||||
@@ -61,6 +61,15 @@ tag:
|
||||
start:
|
||||
@./start.sh
|
||||
|
||||
## stop and remove containers
|
||||
stop:
|
||||
@echo 'stopping and removing containers'
|
||||
@if [ -f './compose_override.yml' ]; then \
|
||||
docker compose --env-file .env -f compose.yml -f compose_override.yml down; \
|
||||
else \
|
||||
docker compose --env-file .env -f compose.yml down; \
|
||||
fi
|
||||
|
||||
## clean orphaned containers
|
||||
clean:
|
||||
@echo 'removing dangling and unused images, containers, nets and volumes'
|
||||
|
||||
Reference in New Issue
Block a user