forked from colonyos/colonies
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.env
More file actions
196 lines (174 loc) · 10.6 KB
/
docker-compose.env
File metadata and controls
196 lines (174 loc) · 10.6 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LC_CTYPE=UTF-8
export TZ=Europe/Stockholm
# ============================================================================
# COLONIES_SERVER_BACKENDS: Controls which backend(s) the server runs
# NOTE: With separate config variables above, each backend is configured
# independently using COLONIES_SERVER_HTTP_*, COLONIES_SERVER_GRPC_*, COLONIES_SERVER_LIBP2P_*, and COLONIES_SERVER_COAP_*
#
# Options:
# "http" - HTTP/HTTPS only (uses COLONIES_SERVER_HTTP_* config)
# "grpc" - gRPC only (uses COLONIES_SERVER_GRPC_* config)
# "libp2p" - LibP2P + HTTP (uses both config sections)
# "coap" - CoAP only (uses COLONIES_SERVER_COAP_* config)
# "http,libp2p" - Same as "libp2p" (runs both backends)
# "libp2p,http" - Same as "libp2p" (runs both backends)
#
# Examples:
# HTTP only (simple deployment):
# export COLONIES_SERVER_BACKENDS="http"
#
# HTTP, gRPC, LibP2P, and CoAP - all four backends running simultaneously
export COLONIES_SERVER_BACKENDS="http"
# ============================================================================
# HTTP SERVER BACKEND CONFIGURATION
# ============================================================================
# Configuration for the HTTP/REST API server backend
export COLONIES_SERVER_HTTP_HOST="0.0.0.0" # Host to bind HTTP server (0.0.0.0 = all interfaces)
export COLONIES_SERVER_HTTP_PORT="50080" # HTTP server port
export COLONIES_SERVER_HTTP_TLS="false" # Enable TLS for HTTP
# export COLONIES_SERVER_HTTP_TLS_CERT="/path/to/cert.pem" # TLS certificate (if TLS enabled)
# export COLONIES_SERVER_HTTP_TLS_KEY="/path/to/key.pem" # TLS key (if TLS enabled)
# ============================================================================
# ============================================================================
# LIBP2P SERVER BACKEND CONFIGURATION
# ============================================================================
# Configuration for the LibP2P P2P networking backend
export COLONIES_SERVER_LIBP2P_PORT="50000" # LibP2P TCP port (QUIC uses port+1)
export COLONIES_SERVER_LIBP2P_IDENTITY="080112407412d2308a3c08439776c236d0c8927bac61acf49bdf4ec1469a5f9ffe187d99f34274f714fea6121a6caccf1c83ef403f14dc3028bd473b7b1e8230985dacb0"
#export COLONIES_SERVER_LIBP2P_ANNOUNCE_ADDRS="/ip4/10.0.0.200/tcp/50000,/ip4/10.0.0.200/udp/50001/quic-v1"
# ============================================================================
# LIBP2P RELAY/BOOTSTRAP NODE CONFIGURATION
# ============================================================================
# Bootstrap peer configuration (points to your relay node on Hetzner)
export COLONIES_SERVER_LIBP2P_BOOTSTRAP_PEERS="/ip4/46.62.173.145/tcp/4002/p2p/12D3KooWDzbnp5RNmHwBYgtsqCSpx2L1TPmBJNta8ECwVmt5n1Np"
export COLONIES_CLIENT_LIBP2P_BOOTSTRAP_PEERS="/ip4/46.62.173.145/udp/4002/quic-v1/p2p/12D3KooWDzbnp5RNmHwBYgtsqCSpx2L1TPmBJNta8ECwVmt5n1Np"
# Public libp2p nodes: DHT + Circuit Relay v2
#export COLONIES_SERVER_LIBP2P_BOOTSTRAP_PEERS="/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN,/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa,/ip4/147.75.83.83/tcp/4001/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb,/ip4/147.75.77.187/tcp/4001/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt"
# Client uses same nodes (DHT + relay)
#export COLONIES_CLIENT_LIBP2P_BOOTSTRAP_PEERS="/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN,/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa,/ip4/147.75.83.83/tcp/4001/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb,/ip4/147.75.77.187/tcp/4001/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt"
# ============================================================================
# GRPC SERVER BACKEND CONFIGURATION
# ============================================================================
# Configuration for the gRPC server backend
export COLONIES_SERVER_GRPC_PORT="50051" # gRPC server port
export COLONIES_SERVER_GRPC_INSECURE="true" # Run without TLS (set to false for production)
# export COLONIES_SERVER_GRPC_TLS_CERT="/path/to/cert.pem" # TLS certificate (required if INSECURE=false)
# export COLONIES_SERVER_GRPC_TLS_KEY="/path/to/key.pem" # TLS key (required if INSECURE=false)
# ============================================================================
# ============================================================================
# COAP SERVER BACKEND CONFIGURATION
# ============================================================================
# Configuration for the CoAP (Constrained Application Protocol) server backend
export COLONIES_SERVER_COAP_PORT="5683" # CoAP server port (UDP, default CoAP port)
# ============================================================================
export COLONIES_MONITOR_PORT="21120"
export COLONIES_MONITOR_INTERVAL="1"
# ============================================================================
# CLIENT BACKEND CONFIGURATION
# ============================================================================
# COLONIES_CLIENT_BACKENDS: Specify which transport(s) the client should use
# Supports comma-separated list for automatic fallback
#
# Options:
# "http" - HTTP/HTTPS only (traditional REST API)
# "grpc" - gRPC only (high-performance RPC)
# "libp2p" - LibP2P P2P networking only
# "coap" - CoAP only (lightweight UDP for IoT)
# "libp2p,http" - Try LibP2P first, fallback to HTTP
# "http,libp2p" - Try HTTP first, fallback to LibP2P
# "grpc,http" - Try gRPC first, fallback to HTTP
# "coap,http" - Try CoAP first, fallback to HTTP
# Default to HTTP for backward compatibility
export COLONIES_CLIENT_BACKENDS="http"
export COLONIES_CLIENT_HTTP_HOST="localhost"
export COLONIES_CLIENT_HTTP_PORT="50080"
export COLONIES_CLIENT_HTTP_INSECURE="true"
export COLONIES_CLIENT_GRPC_HOST="localhost"
export COLONIES_CLIENT_GRPC_PORT="50051"
export COLONIES_CLIENT_GRPC_INSECURE="true"
# DHT discovery:
# - Client will automatically find servers advertising on the DHT
# - Works through NAT/firewalls using libp2p hole-punching and relays
# - No need to know server IP or domain name
# - Server must have COLONIES_LIBP2P_BOOTSTRAP_PEERS set to join DHT network
#
# Alternative multiaddress examples (for LibP2P direct connections):
# - Docker network: export COLONIES_SERVER_HOST="/dns/colonies-server/tcp/5000/p2p/12D3Koo..."
# - Public domain: export COLONIES_SERVER_HOST="/dns/example.com/tcp/5000/p2p/12D3Koo..."
# - Public IP: export COLONIES_SERVER_HOST="/ip4/x.x.x.x/tcp/5000/p2p/12D3Koo..."
export COLONIES_CLIENT_LIBP2P_HOST="dht" # Use DHT discovery
export COLONIES_CLIENT_COAP_HOST="localhost"
export COLONIES_CLIENT_COAP_PORT="5683"
# Backward compatibility (single backend)
export COLONIES_SERVER_HOST="localhost"
# When using DHT discovery:
# - Client will automatically find servers advertising on the DHT
# - Works through NAT/firewalls using libp2p hole-punching and relays
# - No need to know server IP or domain name
# - Server must have COLONIES_LIBP2P_BOOTSTRAP_PEERS set to join DHT network
#
# Alternative multiaddress examples (for LibP2P direct connections):
# - Docker network: export COLONIES_SERVER_HOST="/dns/colonies-server/tcp/5000/p2p/12D3Koo..."
# - Public domain: export COLONIES_SERVER_HOST="/dns/example.com/tcp/5000/p2p/12D3Koo..."
# - Public IP: export COLONIES_SERVER_HOST="/ip4/x.x.x.x/tcp/5000/p2p/12D3Koo..."
# ============================================================================
# ============================================================================
# DATABASE CONFIGURATION
# ============================================================================
export COLONIES_DB_HOST="timescaledb"
export COLONIES_DB_USER="postgres"
export COLONIES_DB_PASSWORD="rFcLGNkgsNtksg6Pgtn9CumL4xXBQ7"
# ============================================================================
# SERVER IDENTITY AND SECURITY
# ============================================================================
export COLONIES_SERVER_ID="039231c7644e04b6895471dd5335cf332681c54e27f81fac54f9067b3f2c0103"
export COLONIES_SERVER_PRVKEY="fcc79953d8a751bf41db661592dc34d30004b1a651ffa0725b03ac227641499d"
export COLONIES_COLONY_NAME="dev"
export COLONIES_COLONY_ID="4787a5071856a4acf702b2ffcea422e3237a679c681314113d86139461290cf4"
export COLONIES_COLONY_PRVKEY="ba949fa134981372d6da62b6a56f336ab4d843b22c02a4257dcf7d0d73097514"
export COLONIES_ID="3fc05cf3df4b494e95d6a3d297a34f19938f7daa7422ab0d4f794454133341ac"
export COLONIES_PRVKEY="ddf7f7791208083b6a9ed975a72684f6406a269cfa36f1b1c32045c0a71fff05"
# ============================================================================
# COLONIES SERVER CONFIGURATION OPTIONS
# ============================================================================
export COLONIES_CRON_CHECKER_PERIOD="1000"
export COLONIES_GENERATOR_CHECKER_PERIOD="1000"
export COLONIES_EXCLUSIVE_ASSIGN="true"
export COLONIES_ALLOW_EXECUTOR_REREGISTER="true"
export COLONIES_RETENTION="false"
export COLONIES_RETENTION_POLICY="200"
export COLONIES_SERVER_PROFILER="false"
export COLONIES_SERVER_PROFILER_PORT="6060"
export COLONIES_VERBOSE="false"
# ============================================================================
# DOCKER EXECUTOR CONFIGURATION
# ============================================================================
export COLONIES_EXECUTOR_TYPE="cli"
export COLONIES_EXECUTOR_NAME="dev-docker"
export EXECUTOR_START_PARALLEL_CONTAINERS="false"
export EXECUTOR_GPU="false"
# ============================================================================
# COLONYFS
# ============================================================================
export MINIO_USER="admin"
export MINIO_PASSWORD="admin12345"
export AWS_S3_ENDPOINT="localhost:9000"
export AWS_S3_ACCESSKEY="RrXN2vcLeHjBptG8a3Ay"
export AWS_S3_SECRETKEY="ivwLB0Luqomq65nNVmoo8fTBgxXgNvqYGC50VQN6"
export AWS_S3_REGION_KEY=""
export AWS_S3_BUCKET="colonies-prod"
export AWS_S3_TLS="false"
export AWS_S3_SKIPVERIFY="false"
export EXECUTOR_FS_DIR="/tmp/cfs"
# ============================================================================
# OTHER
# ============================================================================
# When using the Colonies CLI on Windows with Git Bash, Git Bash will interpret file paths
# starting with a slash (/) and automatically translates these Unix-like paths into
# Windows-style paths, e.g. /c becomes c:/ This behavior can be disabled by the
# setting the MSYS_NO_PATHCONV environment variable to 1.
export MSYS_NO_PATHCONV=1
export COLONIES_CLI_ASCII="false"