-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (23 loc) · 896 Bytes
/
Makefile
File metadata and controls
28 lines (23 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
SHELL := /bin/bash
BUILD_DIR ?= build
PYPNM_VERSION := $(shell sed -n 's/^version[[:space:]]*=[[:space:]]*"\([^"]*\)"/\1/p' pyproject.toml)
DEPLOY_VERSION ?= $(PYPNM_VERSION)
.PHONY: docker-up docker-down docker-logs deploy-bundle
## Build and run the development Docker stack from the repo root
docker-up:
docker compose up -d --build
## Stop the development Docker stack and remove containers/volumes
docker-down:
docker compose down --volumes
## Follow logs from the development Docker stack
docker-logs:
docker compose logs -f pypnm-api
## Create the release-ready deploy bundle tarball
deploy-bundle:
mkdir -p $(BUILD_DIR)
tar -czf $(BUILD_DIR)/pypnm-deploy-$(DEPLOY_VERSION).tar.gz \
-C deploy/docker README.md install.sh \
config/system.json.template \
compose/docker-compose.yml \
compose/.env.example
@echo "Created $(BUILD_DIR)/pypnm-deploy-$(DEPLOY_VERSION).tar.gz"