blockstream-satellite-api/docker-compose.yml

61 lines
1.1 KiB
YAML
Raw Normal View History

2019-01-16 10:22:44 -08:00
version: '3'
services:
blc:
image: "shesek/lightning-charge:0.4.23"
2019-01-16 10:22:44 -08:00
environment:
- API_TOKEN=mySecretToken
volumes:
- blc:/data
api-server:
build: server
2019-01-16 10:22:44 -08:00
depends_on:
- blc
links:
- blc
environment:
- CHARGE_ROOT=http://api-token:mySecretToken@blc:9112
- CALLBACK_URI_ROOT=http://localhost:9292
- CHARGE_API_TOKEN=mySecretToken
- ENV=development
- REDIS_URI=redis://redis:6379
2019-01-16 10:22:44 -08:00
volumes:
- data:/data
workers:
build: server
2019-01-16 10:22:44 -08:00
depends_on:
- api-server
2019-01-16 10:22:44 -08:00
- redis
links:
- redis
environment:
- REDIS_URI=redis://redis:6379
- ENV=development
2019-01-16 10:22:44 -08:00
volumes:
- data:/data
command: workers.sh
sse-server:
2019-01-16 10:22:44 -08:00
build:
context: sse/
depends_on:
- api-server
2019-01-16 10:22:44 -08:00
- redis
links:
- redis
environment:
Support multiple parallel logical message channels The same server now can handle multiple logical channels, on which the transmitter logic runs independently. That is, while previously a single message would be in transmitting state at a time, now multiple messages can be in transmitting state as long as they belong to distinct logical channels. The supported channels each have different permissions. The user channel is where users can post, get, and delete messages as needed. In contrast, the other channels do not grant all permissions to users. Some are read-only (users can get but not post) and there is a channel (the auth channel) on which users have no permissions (neither get nor post). For the channels on which users do not have all permissions (get, post, and delete), this patch adds admin-specific routes, which are prefixed by /admin/. The /admin/ route is protected via SSL in production and allows the admin host to send GET/POST/DELETE requests normally. Hence, for instance, the admin host can post a message on the auth channel (with POST /admin/order) and read it (with GET /admin/order) for transmission over satellite, whereas regulars cannot. With this scheme, the auth channel messages are accessible exclusively over satellite (and not over the internet). The admin routes were added to the following endpoints: - /order/<uuid> (GET and DELETE requests) - /order (POST request) - /orders/<state> (GET request) - /message/<tx_seq_num> (GET request) The messages posted by the admin are not paid, so this patch removes the requirement of invoice generation and payment. Only paid orders now generate an invoice. Thus, the POST request to the /order/ endpoint does not return an invoice for non-paid (admin-only) messages. Also, this patch updates the queue page to display the orders separately for each channel. The query string channel parameter determines which channel the page shows. Finally, this patch updates the events published into the Redis db on transmission. The event includes the corresponding logical channel so that SSE events can be subscribed independently for each channel.
2023-01-31 18:14:55 -03:00
- SUB_CHANNELS=transmissions,gossip,btc-src,auth
2019-01-16 10:22:44 -08:00
- REDIS_URI=redis://redis:6379
redis:
image: "redis:latest"
proxy_server:
image: proxy_server
build: nginx
depends_on:
- api-server
- sse-server
2019-01-16 10:22:44 -08:00
ports:
- 8080:80
2019-01-16 10:22:44 -08:00
volumes:
blc:
data: