mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-13 12:33:25 +02:00
Update docker compose yaml (#259)
* Use sqlite for squeak node in docker compose * Include other sqkserver in docker docker-compose * Use second instance of squeak node in docker compose * Remove old log line
This commit is contained in:
parent
8d1bb513ac
commit
9aef37bd71
7 changed files with 103 additions and 19 deletions
|
|
@ -2,8 +2,9 @@
|
|||
network=testnet
|
||||
price=1000
|
||||
max_squeaks_per_address_per_hour=100
|
||||
database=postgresql
|
||||
database=sqlite
|
||||
sqk_dir=
|
||||
enable_sync=true
|
||||
|
||||
[lnd]
|
||||
host=lnd
|
||||
|
|
|
|||
|
|
@ -1,17 +1,6 @@
|
|||
version: '3'
|
||||
services:
|
||||
|
||||
db:
|
||||
image: postgres
|
||||
container_name: db
|
||||
environment:
|
||||
- POSTGRES_DB=postgres
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
volumes:
|
||||
- postgres_dir:/var/lib/postgresql/data
|
||||
- ../createdb.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
|
||||
btcd:
|
||||
image: btcd
|
||||
container_name: btcd
|
||||
|
|
@ -39,6 +28,26 @@ services:
|
|||
- lnd_dir:/root/.lnd
|
||||
links:
|
||||
- "btcd:btcd"
|
||||
sysctls:
|
||||
- net.ipv6.conf.all.disable_ipv6=0
|
||||
entrypoint: ["./start-lnd.sh"]
|
||||
|
||||
lnd_other:
|
||||
image: lnd_other
|
||||
container_name: lnd_other
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: docker/lnd/Dockerfile
|
||||
environment:
|
||||
- NETWORK=testnet
|
||||
- RPCHOST=btcd
|
||||
volumes:
|
||||
- shared:/rpc
|
||||
- lnd_other_dir:/root/.lnd
|
||||
links:
|
||||
- "btcd:btcd"
|
||||
sysctls:
|
||||
- net.ipv6.conf.all.disable_ipv6=0
|
||||
entrypoint: ["./start-lnd.sh"]
|
||||
|
||||
sqkserver:
|
||||
|
|
@ -56,8 +65,23 @@ services:
|
|||
links:
|
||||
- "btcd:btcd"
|
||||
- "lnd:lnd"
|
||||
depends_on:
|
||||
- db
|
||||
sysctls:
|
||||
- net.ipv6.conf.all.disable_ipv6=0
|
||||
entrypoint: ["./start-sqkserver.sh"]
|
||||
|
||||
sqkserver_other:
|
||||
image: sqkserver_other
|
||||
container_name: sqkserver_other
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: docker/sqkserver/Dockerfile
|
||||
volumes:
|
||||
- shared:/rpc
|
||||
- lnd_other_dir:/root/.lnd
|
||||
- ./config.ini:/app/config.ini
|
||||
links:
|
||||
- "btcd:btcd"
|
||||
- "lnd_other:lnd"
|
||||
sysctls:
|
||||
- net.ipv6.conf.all.disable_ipv6=0
|
||||
entrypoint: ["./start-sqkserver.sh"]
|
||||
|
|
@ -72,6 +96,21 @@ services:
|
|||
- 8080:8080
|
||||
links:
|
||||
- "sqkserver:sqkserver"
|
||||
environment:
|
||||
- SERVICE_NAME=sqkserver
|
||||
|
||||
envoy_other:
|
||||
image: envoy_other
|
||||
container_name: envoy_other
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: docker/envoy/Dockerfile
|
||||
ports:
|
||||
- 8090:8080
|
||||
links:
|
||||
- "sqkserver_other:sqkserver_other"
|
||||
environment:
|
||||
- SERVICE_NAME=sqkserver_other
|
||||
|
||||
frontend:
|
||||
image: frontend
|
||||
|
|
@ -79,9 +118,22 @@ services:
|
|||
build:
|
||||
context: ../
|
||||
dockerfile: docker/frontend/Dockerfile
|
||||
args:
|
||||
- PORT=8080
|
||||
ports:
|
||||
- 8081:8081
|
||||
|
||||
frontend_other:
|
||||
image: frontend_other
|
||||
container_name: frontend_other
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: docker/frontend/Dockerfile
|
||||
args:
|
||||
- PORT=8090
|
||||
ports:
|
||||
- 8091:8081
|
||||
|
||||
volumes:
|
||||
bitcoin:
|
||||
driver: local
|
||||
|
|
@ -94,5 +146,9 @@ volumes:
|
|||
lnd_dir:
|
||||
driver: local
|
||||
|
||||
# lnd_other_dir volume is needed for sharing the lnd tls certificate
|
||||
lnd_other_dir:
|
||||
driver: local
|
||||
|
||||
postgres_dir:
|
||||
driver: local
|
||||
|
|
|
|||
|
|
@ -14,7 +14,18 @@
|
|||
|
||||
FROM envoyproxy/envoy:v1.15.0
|
||||
|
||||
# COPY "docker/envoy/envoy.yaml" /etc/envoy/envoy.yaml
|
||||
COPY "frontend/envoy.yaml" /etc/envoy/envoy.yaml
|
||||
#COPY "frontend/envoy.yaml" /etc/envoy/envoy.yaml
|
||||
|
||||
CMD /usr/local/bin/envoy -c /etc/envoy/envoy.yaml -l trace --log-path /tmp/envoy_info.log
|
||||
#CMD /usr/local/bin/envoy -c /etc/envoy/envoy.yaml -l trace --log-path /tmp/envoy_info.log
|
||||
|
||||
|
||||
|
||||
COPY "frontend/envoy.yaml" /tmpl/envoy.yaml.tmpl
|
||||
COPY docker/envoy/docker-entrypoint.sh /
|
||||
|
||||
RUN chmod 500 /docker-entrypoint.sh
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install gettext -y
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
|
|
|||
8
docker/envoy/docker-entrypoint.sh
Normal file
8
docker/envoy/docker-entrypoint.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "Generating envoy.yaml config file..."
|
||||
cat /tmpl/envoy.yaml.tmpl | envsubst \$ENVOY_LB_ALG,\$SERVICE_NAME > /etc/envoy.yaml
|
||||
|
||||
echo "Starting Envoy..."
|
||||
/usr/local/bin/envoy -c /etc/envoy.yaml
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
FROM node:10-stretch
|
||||
|
||||
ARG PORT
|
||||
|
||||
RUN apt-get -qq update && apt-get -qq install -y \
|
||||
unzip
|
||||
|
||||
|
|
@ -32,6 +34,7 @@ RUN chmod +x pb_disable-eslint.sh && \
|
|||
./pb_disable-eslint.sh src/proto/
|
||||
|
||||
RUN npm install && \
|
||||
REACT_APP_PORT=${PORT} \
|
||||
npm run build
|
||||
|
||||
EXPOSE 8081
|
||||
|
|
|
|||
|
|
@ -50,5 +50,5 @@ static_resources:
|
|||
- endpoint:
|
||||
address:
|
||||
socket_address:
|
||||
address: sqkserver
|
||||
address: ${SERVICE_NAME}
|
||||
port_value: 8994
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
import { SqueakAdminClient } from "../proto/squeak_admin_grpc_web_pb"
|
||||
|
||||
export let client = new SqueakAdminClient('http://' + window.location.hostname + ':8080')
|
||||
const PORT = process.env.REACT_APP_PORT;
|
||||
|
||||
console.log("port:");
|
||||
console.log(PORT);
|
||||
|
||||
export let client = new SqueakAdminClient('http://' + window.location.hostname + ':' + PORT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue