prod
This commit is contained in:
27
ht_booking/Makefile
Normal file
27
ht_booking/Makefile
Normal file
@@ -0,0 +1,27 @@
|
||||
# Production helpers for ht_booking — run these on the server.
|
||||
COMPOSE = docker-compose -f docker-compose.prod.yml
|
||||
|
||||
.PHONY: up down restart logs build ps
|
||||
|
||||
# Build the image (if needed) and start the app in the background.
|
||||
up:
|
||||
$(COMPOSE) up -d --build
|
||||
|
||||
# Stop and remove the container. The database volume is kept.
|
||||
down:
|
||||
$(COMPOSE) down
|
||||
|
||||
# Restart with a fresh build — the usual command after `git pull`.
|
||||
restart: down up
|
||||
|
||||
# Follow the application logs.
|
||||
logs:
|
||||
$(COMPOSE) logs -f --tail=100
|
||||
|
||||
# Rebuild the image from scratch (ignores the Docker layer cache).
|
||||
build:
|
||||
$(COMPOSE) build --no-cache
|
||||
|
||||
# Show container status.
|
||||
ps:
|
||||
$(COMPOSE) ps
|
||||
Reference in New Issue
Block a user