-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.fem
27 lines (21 loc) · 1.11 KB
/
Makefile.fem
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
SHELL := /bin/bash
prepare-fem:
@mkdir -p target/fem/certs
@chmod 755 target/fem/certs
@mkdir -p target/fem/config
@chmod 755 target/fem/config
@cp -n fem/docker-compose-fem.yml target/fem
config: prepare-fem
@cp -rn fem/config target/fem
@find target/fem/config/ -type d -exec chmod 755 {} \;
@find target/fem/config/ -type f -exec chmod 644 {} \;
certs: prepare-fem
@openssl req -newkey rsa:4096 -nodes -keyout target/fem/certs/server.key -subj "/C=DE/ST=Sachsen/L=Dresden/O=Deutsche Telekom MMS GmbH/CN=monitoring-host" -out target/fem/certs/server.csr
@openssl x509 -req -extfile <(printf "subjectAltName=DNS:fem-otel-collector,DNS:fem-grafana.localhost,DNS:fem-demoapp.localhost,DNS:localhost,IP:127.0.0.1") -days 365 -in target/fem/certs/server.csr -signkey target/fem/certs/server.key -out target/fem/certs/server.crt
@chmod 644 target/fem/certs/server.key target/fem/certs/server.crt
start: config certs
docker-compose --file target/fem/docker-compose-fem.yml --project-name fem up -d
stop: prepare-fem
docker-compose --file target/fem/docker-compose-fem.yml --project-name fem down
clean:
@rm -rf target/fem