initial dump of deployment files
This commit is contained in:
commit
16e3c3fb31
8 changed files with 1593 additions and 0 deletions
24
Makefile
Normal file
24
Makefile
Normal file
|
@ -0,0 +1,24 @@
|
|||
CONFIG_FILE = conf/config.env
|
||||
SECRET_FILE = conf/secrets.env
|
||||
|
||||
COMPOSE_CMD ?= docker compose
|
||||
# use unix:///run/docker.sock for docker socket, unix://${XDG_RUNTIME_DIR}/podman/podman.sock for podman
|
||||
DOCKER_HOST ?= unix:///run/docker.sock
|
||||
COMPOSE = DOCKER_HOST=$(DOCKER_HOST) $(COMPOSE_CMD)
|
||||
|
||||
psql:
|
||||
$(COMPOSE) exec inventree-db sh -c 'psql $$POSTGRES_USER $$POSTGRES_DB'
|
||||
|
||||
update:
|
||||
read -p "Update will cause downtime of the server. Are you sure you want to continue? Press Ctrl+c to abort!" _
|
||||
$(COMPOSE) down
|
||||
$(COMPOSE) pull
|
||||
$(COMPOSE) run inventree-server invoke update
|
||||
$(COMPOSE) up -d
|
||||
|
||||
data: # podman does not autocreate data folder
|
||||
mkdir data
|
||||
|
||||
# pass all commands to compose cli
|
||||
%: data
|
||||
$(COMPOSE) $@
|
Loading…
Add table
Add a link
Reference in a new issue