adding makefile for ez-pz admin

master
lza_menace 4 years ago
parent 9c27257cce
commit abe7f70ca3

@ -0,0 +1,22 @@
.PHONY: format help
# Help system from https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.DEFAULT_GOAL := help
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
setup: ## Install dependencies to the system
sudo bash setup.sh
up: ## Fetch images and run containers
docker-compose up -d
down: ## Remove containers
docker-compose down
logs: ## View container logs
docker-compose logs -f
restart: ## Restart containers
docker-compose restart

@ -7,7 +7,7 @@ CI system and build tooling to support automation for Wownero development.
Install Docker. I'm using a Ubuntu 20.04 machine. Not a HA or scaling setup, just containers running on a box. Setup script provided.
```
sudo bash setup.sh
make setup
```
Next, setup the secrets:
@ -18,4 +18,4 @@ vim .env
# generate new secrets and fill out all variables
```
Use `docker-compose` to start the services.
Use `docker-compose` to start the services. A `Makefile` has been provided for convenience with all of the typical commands to be run.

@ -3,7 +3,7 @@
set -x
apt-get remove docker docker-engine docker.io containerd runc -y
apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y
apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common make -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"