2023-08-09 10:36:03 +00:00
|
|
|
version: "3.7"
|
|
|
|
x-logging: &logging
|
|
|
|
logging:
|
|
|
|
driver: json-file
|
|
|
|
options:
|
|
|
|
max-size: 1000m
|
|
|
|
|
|
|
|
# Environment variable definitions
|
2023-09-22 08:45:45 +00:00
|
|
|
x-eth-client-address: ð_client_address ${ETH_CLIENT_ADDRESS:-} # Add your ETH_CLIENT_ADDRESS after the "-"
|
|
|
|
|
|
|
|
x-rln-environment: &rln_env
|
2023-10-31 11:12:42 +00:00
|
|
|
RLN_RELAY_CONTRACT_ADDRESS: ${RLN_RELAY_CONTRACT_ADDRESS:-0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4}
|
2023-09-22 08:45:45 +00:00
|
|
|
RLN_RELAY_CRED_PATH: ${RLN_RELAY_CRED_PATH:-} # Optional: Add your RLN_RELAY_CRED_PATH after the "-"
|
|
|
|
RLN_RELAY_CRED_PASSWORD: ${RLN_RELAY_CRED_PASSWORD:-} # Optional: Add your RLN_RELAY_CRED_PASSWORD after the "-"
|
|
|
|
|
2023-08-09 10:36:03 +00:00
|
|
|
x-pg-pass: &pg_pass ${POSTGRES_PASSWORD:-test123}
|
|
|
|
x-pg-user: &pg_user ${POSTGRES_USER:-postgres}
|
|
|
|
|
|
|
|
x-pg-environment: &pg_env
|
2023-09-21 09:25:39 +00:00
|
|
|
POSTGRES_USER: *pg_user
|
|
|
|
POSTGRES_PASSWORD: *pg_pass
|
2023-08-09 10:36:03 +00:00
|
|
|
|
|
|
|
x-pg-exporter-env: &pg_exp_env
|
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD: *pg_pass
|
|
|
|
DATA_SOURCE_URI: postgres?sslmode=disable
|
|
|
|
DATA_SOURCE_USER: *pg_user
|
|
|
|
DATA_SOURCE_PASS: *pg_pass
|
|
|
|
PG_EXPORTER_EXTEND_QUERY_PATH: /etc/pgexporter/queries.yml
|
|
|
|
|
|
|
|
# Services definitions
|
|
|
|
services:
|
|
|
|
nwaku:
|
2024-05-16 17:31:37 +00:00
|
|
|
image: ${NWAKU_IMAGE:-gabrielmer/heaptrack:test}
|
2023-10-31 11:12:42 +00:00
|
|
|
restart: on-failure
|
2023-08-09 10:36:03 +00:00
|
|
|
ports:
|
|
|
|
- 30304:30304/tcp
|
|
|
|
- 30304:30304/udp
|
|
|
|
- 9005:9005/udp
|
2023-08-10 08:52:46 +00:00
|
|
|
- 127.0.0.1:8003:8003
|
2023-09-05 11:13:59 +00:00
|
|
|
- 80:80 #Let's Encrypt
|
|
|
|
- 8000:8000/tcp #WSS
|
2023-10-02 13:06:18 +00:00
|
|
|
- 127.0.0.1:8645:8645
|
2023-08-09 10:36:03 +00:00
|
|
|
<<:
|
|
|
|
- *logging
|
2023-09-05 11:13:59 +00:00
|
|
|
environment:
|
|
|
|
DOMAIN: ${DOMAIN}
|
|
|
|
NODEKEY: ${NODEKEY}
|
2024-01-09 10:42:20 +00:00
|
|
|
RLN_RELAY_CRED_PASSWORD: "${RLN_RELAY_CRED_PASSWORD}"
|
2023-09-22 08:45:45 +00:00
|
|
|
ETH_CLIENT_ADDRESS: *eth_client_address
|
2023-09-05 11:13:59 +00:00
|
|
|
EXTRA_ARGS: ${EXTRA_ARGS}
|
2024-03-14 09:05:57 +00:00
|
|
|
STORAGE_SIZE: ${STORAGE_SIZE}
|
2023-11-01 15:14:01 +00:00
|
|
|
<<:
|
|
|
|
- *pg_env
|
|
|
|
- *rln_env
|
2023-08-09 10:36:03 +00:00
|
|
|
volumes:
|
|
|
|
- ./run_node.sh:/opt/run_node.sh:Z
|
2023-09-21 12:49:43 +00:00
|
|
|
- ${CERTS_DIR:-./certs}:/etc/letsencrypt/:Z
|
2023-09-21 09:25:39 +00:00
|
|
|
- ./rln_tree:/etc/rln_tree/:Z
|
2024-02-14 13:56:21 +00:00
|
|
|
- ./keystore:/keystore:Z
|
2023-08-09 10:36:03 +00:00
|
|
|
entrypoint: sh
|
|
|
|
command:
|
|
|
|
- /opt/run_node.sh
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
|
2023-11-07 18:05:11 +00:00
|
|
|
# TODO: Commented until ready
|
|
|
|
#waku-frontend:
|
|
|
|
# # TODO: migrate to waku-org
|
|
|
|
# image: docker.io/alrevuelta/waku-frontend:latest
|
|
|
|
# #command:
|
|
|
|
# # - xxx
|
|
|
|
# ports:
|
|
|
|
# - 127.0.0.1:4000:3000
|
|
|
|
# restart: on-failure:5
|
|
|
|
# depends_on:
|
|
|
|
# - nwaku
|
2023-11-01 15:45:46 +00:00
|
|
|
|
2023-08-09 10:36:03 +00:00
|
|
|
prometheus:
|
|
|
|
image: docker.io/prom/prometheus:latest
|
|
|
|
volumes:
|
|
|
|
- ./monitoring/prometheus-config.yml:/etc/prometheus/prometheus.yml:Z
|
|
|
|
command:
|
|
|
|
- --config.file=/etc/prometheus/prometheus.yml
|
2024-05-15 16:19:33 +00:00
|
|
|
# ports:
|
|
|
|
# - 127.0.0.1:9090:9090
|
2023-10-03 12:34:52 +00:00
|
|
|
restart: on-failure:5
|
2023-08-09 10:36:03 +00:00
|
|
|
depends_on:
|
|
|
|
- postgres-exporter
|
|
|
|
- nwaku
|
|
|
|
|
|
|
|
grafana:
|
|
|
|
image: docker.io/grafana/grafana:latest
|
|
|
|
env_file:
|
|
|
|
- ./monitoring/configuration/grafana-plugins.env
|
|
|
|
volumes:
|
|
|
|
- ./monitoring/configuration/grafana.ini:/etc/grafana/grafana.ini:Z
|
|
|
|
- ./monitoring/configuration/dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml:Z
|
|
|
|
- ./monitoring/configuration/datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml:Z
|
|
|
|
- ./monitoring/configuration/dashboards:/var/lib/grafana/dashboards/:Z
|
|
|
|
- ./monitoring/configuration/customizations/custom-logo.svg:/usr/share/grafana/public/img/grafana_icon.svg:Z
|
|
|
|
- ./monitoring/configuration/customizations/custom-logo.svg:/usr/share/grafana/public/img/grafana_typelogo.svg:Z
|
|
|
|
- ./monitoring/configuration/customizations/custom-logo.png:/usr/share/grafana/public/img/fav32.png:Z
|
|
|
|
ports:
|
2024-03-06 14:08:54 +00:00
|
|
|
- 0.0.0.0:3000:3000
|
2023-10-03 12:34:52 +00:00
|
|
|
restart: on-failure:5
|
2023-08-09 10:36:03 +00:00
|
|
|
depends_on:
|
|
|
|
- prometheus
|
|
|
|
|
|
|
|
postgres:
|
|
|
|
# This service is used when the Waku node has the 'store' protocol enabled
|
|
|
|
# and the store-message-db-url is set to use Postgres
|
2023-09-25 15:50:18 +00:00
|
|
|
image: postgres:15.4-alpine3.18
|
2023-10-03 12:34:52 +00:00
|
|
|
restart: on-failure:5
|
2023-09-05 11:13:59 +00:00
|
|
|
environment:
|
|
|
|
<<: *pg_env
|
2023-08-09 10:36:03 +00:00
|
|
|
volumes:
|
2023-09-05 11:13:59 +00:00
|
|
|
- ./postgres_cfg/postgresql.conf:/etc/postgresql/postgresql.conf:Z
|
|
|
|
- ./postgres_cfg/db.sql:/docker-entrypoint-initdb.d/db.sql:Z
|
2023-10-18 12:40:03 +00:00
|
|
|
- ${PG_DATA_DIR:-./postgresql}:/var/lib/postgresql/data:Z
|
2023-08-09 10:36:03 +00:00
|
|
|
command: postgres -c config_file=/etc/postgresql/postgresql.conf
|
2024-03-19 10:05:44 +00:00
|
|
|
ports:
|
|
|
|
- 127.0.0.1:5432:5432
|
2023-08-09 10:36:03 +00:00
|
|
|
healthcheck:
|
2024-02-15 15:26:20 +00:00
|
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
|
2023-08-09 10:36:03 +00:00
|
|
|
interval: 30s
|
|
|
|
timeout: 60s
|
|
|
|
retries: 5
|
|
|
|
start_period: 80s
|
|
|
|
|
|
|
|
postgres-exporter:
|
|
|
|
# Service aimed to scrape information from Postgres and post it to Prometeus
|
|
|
|
image: quay.io/prometheuscommunity/postgres-exporter:v0.12.0
|
2023-10-03 12:34:52 +00:00
|
|
|
restart: on-failure:5
|
2023-08-09 10:36:03 +00:00
|
|
|
<<: *pg_exp_env
|
|
|
|
volumes:
|
2023-09-05 11:13:59 +00:00
|
|
|
- ./monitoring/configuration/postgres-exporter.yml:/etc/pgexporter/postgres-exporter.yml:Z
|
|
|
|
- ./monitoring/configuration/pg-exporter-queries.yml:/etc/pgexporter/queries.yml:Z
|
2023-08-09 10:36:03 +00:00
|
|
|
command:
|
|
|
|
# Both the config file and 'DATA_SOURCE_NAME' should contain valid connection info
|
|
|
|
- --config.file=/etc/pgexporter/postgres-exporter.yml
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
2024-05-07 14:24:06 +00:00
|
|
|
|
2024-05-09 09:15:57 +00:00
|
|
|
## Remove comment if you need pgadmin support in your container.
|
|
|
|
## Commented for backward version compatibility of docker-compose.
|
|
|
|
# pgadmin:
|
|
|
|
# image: dpage/pgadmin4:latest
|
|
|
|
# environment:
|
|
|
|
# - PGADMIN_DEFAULT_EMAIL=waku@waku.com
|
|
|
|
# - PGADMIN_DEFAULT_PASSWORD=wakuwaku
|
|
|
|
# - PGADMIN_CONFIG_SERVER_MODE=False
|
|
|
|
# - PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False
|
|
|
|
# - PGADMIN_LISTEN_PORT=80
|
|
|
|
# ports:
|
|
|
|
# - 15432:80
|
|
|
|
# user: root
|
|
|
|
# entrypoint: /bin/sh -c "chmod 600 /pgpass; /entrypoint.sh;"
|
|
|
|
# volumes:
|
|
|
|
# - pgadmin:/var/lib/pgadmin
|
|
|
|
# configs:
|
|
|
|
# - source: servers.json
|
|
|
|
# target: /pgadmin4/servers.json
|
|
|
|
# - source: pgpass
|
|
|
|
# target: /pgpass
|
|
|
|
# depends_on:
|
|
|
|
# - postgres
|
|
|
|
# profiles:
|
|
|
|
# - dbadmin
|
2024-05-07 14:24:06 +00:00
|
|
|
|
2024-05-09 09:15:57 +00:00
|
|
|
# volumes:
|
|
|
|
# pgadmin:
|
2024-05-07 14:24:06 +00:00
|
|
|
|
2024-05-09 09:15:57 +00:00
|
|
|
# configs:
|
|
|
|
# pgpass:
|
|
|
|
# content: postgres:5432:*:${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-test123}
|
|
|
|
# servers.json:
|
|
|
|
# content: |
|
|
|
|
# {"Servers": {"1": {
|
|
|
|
# "Group": "Servers",
|
|
|
|
# "Name": "WakuStoreDB",
|
|
|
|
# "Host": "postgres",
|
|
|
|
# "Port": 5432,
|
|
|
|
# "MaintenanceDB": "postgres",
|
|
|
|
# "Username": "postgres",
|
|
|
|
# "PassFile": "/pgpass",
|
|
|
|
# "SSLMode": "disable"
|
|
|
|
# }}}
|