/
docker_code
/
openbao
Обзор
Документация
Войти
/
docker_code
/
openbao
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
master
Makefile
97 строк
3 KB
codesshaman
initial commit
07 авг 2026, 14:42
07 авг 2026, 14:42
346dec8
Код
Авторство
О чём код?
name = Openbao NO_COLOR=\033[0m # Color Reset COLOR_OFF='\e[0m' # Color Off OK_COLOR=\033[32;01m # Green Ok ERROR_COLOR=\033[31;01m # Error red WARN_COLOR=\033[33;01m # Warning yellow RED='\e[1;31m' # Red GREEN='\e[1;32m' # Green YELLOW='\e[1;33m' # Yellow BLUE='\e[1;34m' # Blue PURPLE='\e[1;35m' # Purple CYAN='\e[1;36m' # Cyan WHITE='\e[1;37m' # White UCYAN='\e[4;36m' # Cyan ifneq (,$(wildcard .env)) include .env export $(shell sed 's/=.*//' .env) endif all: @printf "Launch configuration ${name}...\n" @docker-compose -f ./docker-compose.yml up -d help: @echo -e "$(OK_COLOR)==== All commands of ${name} configuration ====$(NO_COLOR)" @echo -e "$(WARN_COLOR)- make : Launch configuration" @echo -e "$(WARN_COLOR)- make build : Building configuration" @echo -e "$(WARN_COLOR)- make down : Stopping configuration" @echo -e "$(WARN_COLOR)- make env : Create .env-file" @echo -e "$(WARN_COLOR)- make git : Set user name and email to git" @echo -e "$(WARN_COLOR)- make ps : View configuration" @echo -e "$(WARN_COLOR)- make push : Push changes to the github" @echo -e "$(WARN_COLOR)- make re : Rebuild configuration" @echo -e "$(WARN_COLOR)- make clean : Cleaning configuration$(NO_COLOR)" build: @printf "$(OK_COLOR)==== Building configuration ${name}... ====$(NO_COLOR)\n" @bash ./scripts/chmod.sh @docker-compose -f ./docker-compose.yml up -d --build check: @printf "$(OK)==== Checking ${OPENBAO_NAME} config... ====$(NO_COLOR)\n" @docker exec -it ${OPENBAO_NAME} sh -c "promtool check config /etc/prometheus/prometheus.yml" con: conn conn: @printf "$(OK)==== Connect to ${OPENBAO_NAME} container... ====$(NO_COLOR)\n" @docker exec -it ${OPENBAO_NAME} sh down: @printf "$(ERROR_COLOR)==== Stopping configuration ${name}... ====$(NO_COLOR)\n" @docker-compose -f ./docker-compose.yml down env: @printf "$(ERROR_COLOR)==== Create environment file for ${name}... ====$(NO_COLOR)\n" @if [ -f .env ]; then \ rm .env; \ fi; \ cp .env.example .env; \ git: @printf "$(YELLOW)==== Set user name and email to git for ${name} repo... ====$(NO_COLOR)\n" @bash ./scripts/gituser.sh log: @printf "$(OK)==== Show ${OPENBAO_NAME} logs... ====$(NO_COLOR)\n" @docker logs -f ${OPENBAO_NAME} logs: @printf "$(OK)==== Show ${OPENBAO_NAME} logs... ====$(NO_COLOR)\n" @docker logs -f ${OPENBAO_NAME} ps: @printf "$(BLUE)==== View configuration ${name}... ====$(NO_COLOR)\n" @docker-compose -f ./docker-compose.yml ps push: @bash ./scripts/push.sh re: down @printf "$(OK_COLOR)==== Rebuild configuration ${name}... ====$(NO_COLOR)\n" @docker-compose -f ./docker-compose.yml up -d --build clean: down @printf "$(ERROR_COLOR)==== Cleaning configuration ${name}... ====$(NO_COLOR)\n" @docker system prune -a fclean: @printf "$(ERROR_COLOR)==== Total clean of all configurations docker ====$(NO_COLOR)\n" # @docker stop $$(docker ps -qa) # @docker system prune --all --force --volumes # @docker network prune --force # @docker volume prune --force .PHONY : all help build check down re pass pas ps clean fclean