build(Makefile): add psql target
This commit is contained in:
parent
b46228df26
commit
8302df0563
14
Makefile
14
Makefile
@ -81,16 +81,12 @@ release:
|
|||||||
git commit -m "chore(release): $${VERSION}"
|
git commit -m "chore(release): $${VERSION}"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
# TODO: rewrite shell targets to enter shell inside currently running containers, do not just launch new containers!
|
|
||||||
.PHONY: %-shell
|
.PHONY: %-shell
|
||||||
# HELP: launches bash-shell inside backend/frontend container
|
# HELP: launch shell (bash) inside a currently running container
|
||||||
%-shell: ENTRYPOINT=/bin/bash
|
%-shell: ENTRYPOINT=/bin/bash
|
||||||
%-shell: --%-shell;
|
%-shell: --%-shell;
|
||||||
--%-shell:
|
--%-shell:
|
||||||
MOUNT_DIR=/mnt/fradrive ; \
|
$(CONTAINER_COMMAND) exec -it $(EXEC_OPTS) fradrive.$(CURR_DEV).$* $(ENTRYPOINT)
|
||||||
FRADRIVE_SERVICE=$* ; \
|
|
||||||
$(MAKE) -- --image-build FRADRIVE_SERVICE=$${FRADRIVE_SERVICE} ; \
|
|
||||||
$(CONTAINER_FGRUN) -v $(PWD):$${MOUNT_DIR} --env IN_CONTAINER=true --env CONTAINER_FILE=$(CONTAINER_FILE) --entrypoint $(ENTRYPOINT) --name fradrive.$(CURR_DEV).$${FRADRIVE_SERVICE}.shell fradrive/$${FRADRIVE_SERVICE}
|
|
||||||
|
|
||||||
##### GENERAL TARGETS #####
|
##### GENERAL TARGETS #####
|
||||||
###########################
|
###########################
|
||||||
@ -232,6 +228,12 @@ db: compile-frontend --image-build --containerized---db;
|
|||||||
--containerized-%-database: docker/database/initdb.sh docker/database/pg_hba.conf docker/database/postgresql.conf docker/database/schema.sql --image-build
|
--containerized-%-database: docker/database/initdb.sh docker/database/pg_hba.conf docker/database/postgresql.conf docker/database/schema.sql --image-build
|
||||||
$(MAKE) -- --image-run-$*-database
|
$(MAKE) -- --image-run-$*-database
|
||||||
|
|
||||||
|
.PHONY: psql
|
||||||
|
# HELP: enter psql (postgresql) cli inside a currently running database container
|
||||||
|
psql: ENTRYPOINT=/usr/bin/psql
|
||||||
|
psql: EXEC_OPTS=--user postgres
|
||||||
|
psql: --database-shell;
|
||||||
|
|
||||||
##### DATABASE TARGETS #####
|
##### DATABASE TARGETS #####
|
||||||
############################
|
############################
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user