-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcelestia-node.yml
73 lines (70 loc) · 2.69 KB
/
celestia-node.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
x-logging: &logging
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
tag: '{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}'
services:
celestia-node:
build:
context: ./celestia-node
dockerfile: Dockerfile.binary
args:
- CELESTIA_NODE_VERSION=${CELESTIA_NODE_VERSION:-v0.20.4}
- USER=celestia
image: celestia-node:local
pull_policy: never
user: celestia
restart: unless-stopped
stop_grace_period: 5m
environment:
- CELESTIA_NODE_TYPE=${CELESTIA_NODE_TYPE}
- P2P_PORT=${CELESTIA_NODE_P2P_PORT:-2121}
- NETWORK=${NETWORK:-celestia}
- EXTRAS=${CELESTIA_NODE_EXTRA_FLAGS}
<<: *logging
volumes:
- celestia-node-data:/data
- ./keys/celestia-node:/data/keys/keyring-test:ro
entrypoint:
- docker-entrypoint.sh
- celestia
- ${CELESTIA_NODE_TYPE}
- start
- --node.store
- /data
- --core.ip
- ${CELESTIA_NODE_GRPC}
- --keyring.keyname
- ${MONIKER}
- --rpc.port
- ${CELESTIA_NODE_RPC_PORT}
- --rpc.addr
- "0.0.0.0"
labels:
- traefik.enable=true
- traefik.http.routers.${CELESTIA_NODE_HOST}.service=${CELESTIA_NODE_HOST}
- traefik.http.routers.${CELESTIA_NODE_HOST}.entrypoints=websecure
- traefik.http.routers.${CELESTIA_NODE_HOST}.rule=Host(`${CELESTIA_NODE_HOST}.${DOMAIN}`)
- traefik.http.routers.${CELESTIA_NODE_HOST}.tls.certresolver=letsencrypt
- traefik.http.routers.${CELESTIA_NODE_HOST}lb.service=${CELESTIA_NODE_HOST}
- traefik.http.routers.${CELESTIA_NODE_HOST}lb.entrypoints=websecure
- traefik.http.routers.${CELESTIA_NODE_HOST}lb.rule=Host(`${CELESTIA_NODE_LB}.${DOMAIN}`)
- traefik.http.routers.${CELESTIA_NODE_HOST}lb.tls.certresolver=letsencrypt
- traefik.http.services.${CELESTIA_NODE_HOST}.loadbalancer.server.port=${CELESTIA_NODE_RPC_PORT}
create-celestia-node-key:
profiles: ["tools"]
image: ghcr.io/celestiaorg/celestia-node:${CELESTIA_NODE_VERSION:-v0.20.4}
user: root
volumes:
- ./keys/celestia-node:/home/celestia/keys/keyring-test:rw
entrypoint: ["/bin/bash","-c"]
command:
- |
P2P_NETWORK=$(echo "$NETWORK" | grep -Eo 'mocha|arabica' | sed 's/^/--p2p.network /' || echo "")
cel-key add $MONIKER --keyring-backend test --node.type $CELESTIA_NODE_TYPE $$P2P_NETWORK 2>&1 | tee /tmp/temp_backup
[ $${PIPESTATUS[0]} -eq 0 ] && sed -n '/- address/,$$p' /tmp/temp_backup > "/home/celestia/keys/keyring-test/$MONIKER.backup" || rm /tmp/temp_backup
chown -R celestia:celestia /home/celestia/keys/keyring-test/*
volumes:
celestia-node-data: