-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile
45 lines (42 loc) · 1.29 KB
/
Makefile
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
SHELL := $(shell which bash)
docker-build:
@set -o pipefail; \
cd docker && \
set -a && source .env && set +a && \
mkdir -p config/lnd && \
echo "Checking LND files..." && \
echo "LND_CERT_FILE=$${LND_CERT_FILE}" && \
echo "LND_MACAROON_FILE=$${LND_MACAROON_FILE}" && \
if [ ! -f "$${LND_CERT_FILE}" ]; then \
echo "Error: LND cert file not found at: $${LND_CERT_FILE}"; \
exit 1; \
fi && \
if [ ! -f "$${LND_MACAROON_FILE}" ]; then \
echo "Error: LND macaroon file not found at: $${LND_MACAROON_FILE}"; \
exit 1; \
fi && \
echo "Copying LND cert and macaroon to docker config" && \
cp -v $${LND_CERT_FILE} config/lnd/tls.cert && \
cp -v $${LND_MACAROON_FILE} config/lnd/admin.macaroon && \
echo "Building docker image" && \
docker compose build
docker-up:
@set -o pipefail; \
cd docker && \
echo "Copying Nostr relay config" && \
mkdir -p config/relay && \
cp -v ./relay_config.toml config/relay/config.toml && \
echo "Starting services" && \
docker compose up -d
docker-relay-up:
@set -o pipefail; \
cd docker && \
echo "Copying Nostr relay config" && \
mkdir -p config/relay && \
cp -v ./relay_config.toml config/relay/config.toml && \
echo "Starting Nostr relay" && \
docker compose up -d nostr-relay
docker-down:
@set -o pipefail; \
cd docker && \
docker compose down