113 lines
3.2 KiB
Makefile
113 lines
3.2 KiB
Makefile
|
DATA_ROOT := /home/gfs-data
|
||
|
|
||
|
all:
|
||
|
@echo "ERROR: Be specific with one or more targets"
|
||
|
|
||
|
build:
|
||
|
DOCKER_BUILDKIT=1 docker build -t alpine:prom-proc-net -f Dockerfile.prom-proc-net .
|
||
|
|
||
|
push:
|
||
|
docker tag alpine:prom-proc-net docker.io/hyunghwan/alpine:prom-proc-net
|
||
|
docker push docker.io/hyunghwan/alpine:prom-proc-net
|
||
|
|
||
|
init-traefik-data:
|
||
|
mkdir -p "$(DATA_ROOT)/traefik"
|
||
|
cp traefik-cert.yml "$(DATA_ROOT)/traefik"
|
||
|
cp /etc/letsencrypt/live/miflux.com/fullchain.pem "$(DATA_ROOT)/traefik/miflux.crt"
|
||
|
cp /etc/letsencrypt/live/miflux.com/privkey.pem "$(DATA_ROOT)/traefik/miflux.key"
|
||
|
|
||
|
init-prometheus-data:
|
||
|
mkdir -p "$(DATA_ROOT)/prometheus/etc"
|
||
|
mkdir -p "$(DATA_ROOT)/prometheus/data"
|
||
|
chown 65534:65534 "$(DATA_ROOT)/prometheus/data"
|
||
|
cp prometheus.conf.yml "$(DATA_ROOT)/prometheus/etc/prometheus.yml"
|
||
|
|
||
|
network-up-drone:
|
||
|
docker network create --driver overlay --attachable drone-network
|
||
|
|
||
|
network-down-drone:
|
||
|
docker network rm drone-network
|
||
|
|
||
|
network-up-prometheus:
|
||
|
docker network create --driver overlay --attachable prometheus-network
|
||
|
|
||
|
network-down-prometheus:
|
||
|
docker network rm prometheus-network
|
||
|
|
||
|
network-up-traefik:
|
||
|
docker network create --driver overlay --attachable traefik-network
|
||
|
|
||
|
network-down-traefik:
|
||
|
docker network rm traefik-network
|
||
|
|
||
|
stack-up-traefik:
|
||
|
docker stack deploy --compose-file traefik.yml traefik-stack
|
||
|
|
||
|
stack-down-traefik:
|
||
|
docker stack rm traefik-stack
|
||
|
|
||
|
|
||
|
stack-up-codepot:
|
||
|
docker stack deploy --compose-file codepot.yml codepot-stack
|
||
|
|
||
|
stack-down-codepot:
|
||
|
docker stack rm codepot-stack
|
||
|
|
||
|
stack-up-gitea:
|
||
|
docker stack deploy --compose-file gitea.yml gitea-stack
|
||
|
|
||
|
stack-down-gitea:
|
||
|
docker stack rm gitea-stack
|
||
|
|
||
|
stack-up-drone:
|
||
|
docker stack deploy --compose-file drone.yml drone-stack
|
||
|
|
||
|
stack-down-drone:
|
||
|
docker stack rm drone-stack
|
||
|
|
||
|
stack-up-drone-runner:
|
||
|
docker stack deploy --compose-file drone-runner.yml drone-runner-stack
|
||
|
|
||
|
stack-down-drone-runner:
|
||
|
docker stack rm drone-runner-stack
|
||
|
|
||
|
stack-up-portainer:
|
||
|
docker stack deploy --compose-file portainer.yml portainer-stack
|
||
|
|
||
|
stack-down-portainer:
|
||
|
docker stack rm portainer-stack
|
||
|
|
||
|
#------------------------------------------------
|
||
|
stack-up-cadvisor:
|
||
|
docker stack deploy --compose-file cadvisor.yml cadvisor-stack
|
||
|
|
||
|
stack-down-cadvisor:
|
||
|
docker stack rm cadvisor-stack
|
||
|
|
||
|
stack-up-prometheus-node-exporter:
|
||
|
docker stack deploy --compose-file prometheus-node-exporter.yml prometheus-node-exporter-stack
|
||
|
|
||
|
stack-down-prometheus-node-exporter:
|
||
|
docker stack rm prometheus-node-exporter-stack
|
||
|
|
||
|
stack-up-prometheus:
|
||
|
docker stack deploy --compose-file prometheus.yml prometheus-stack
|
||
|
|
||
|
stack-down-prometheus:
|
||
|
docker stack rm prometheus-stack
|
||
|
|
||
|
stack-up-grafana:
|
||
|
docker stack deploy --compose-file grafana.yml grafana-stack
|
||
|
|
||
|
stack-down-grafana:
|
||
|
docker stack rm grafana-stack
|
||
|
|
||
|
stack-up-monitor: stack-up-prometheus-node-exporter stack-up-prometheus stack-up-grafana
|
||
|
|
||
|
stack-down-monitor: stack-down-grafana stack-down-prometheus stack-down-prometheus-node-exporter
|
||
|
|
||
|
#------------------------------------------------
|
||
|
stack-down-all: stack-down-portainer stack-down-drone-runner stack-down-drone stack-down-gitea stack-down-codepot stack-down-traefik
|
||
|
|
||
|
stack-up-all: stack-up-traefik stack-up-codepot stack-up-gitea stack-up-drone stack-up-drone-runner stack-up-portainer
|