-
Notifications
You must be signed in to change notification settings - Fork 115
/
docker-compose.storage-squid.yml
77 lines (72 loc) · 2.24 KB
/
docker-compose.storage-squid.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
74
75
76
77
services:
squid_db:
container_name: squid_db
hostname: squid-db
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_DB: ${SQUID_DB_NAME}
POSTGRES_PASSWORD: ${SQUID_DB_PASS}
networks:
- joystream
ports:
- '127.0.0.1:${SQUID_DB_PORT}:${SQUID_DB_PORT}'
command: ['postgres', '-c', 'config_file=/etc/postgresql/postgresql.conf', '-p', '${SQUID_DB_PORT}']
shm_size: 1.1g # A bit higher than `shared_buffers` value in postgres.conf
volumes:
- squid_db_data:/var/lib/postgresql/data
- ./postgres.conf:/etc/postgresql/postgresql.conf
squid_processor:
image: joystream/storage-squid:latest
container_name: squid_processor
hostname: squid-processor
restart: unless-stopped
env_file:
- .env
environment:
- DB_NAME=${SQUID_DB_NAME}
- DB_PASS=${SQUID_DB_PASS}
- DB_PORT=${SQUID_DB_PORT}
- DB_HOST=${SQUID_DB_HOST}
- GQL_PORT=${SQUID_GQL_PORT}
- ARCHIVE_GATEWAY_URL=${SQUID_ARCHIVE_GATEWAY_URL}
- RPC_ENDPOINT=${JOYSTREAM_NODE_WS}
ports:
- '127.0.0.1:${SQUID_PROCESSOR_PROMETHEUS_PORT}:${SQUID_PROCESSOR_PROMETHEUS_PORT}'
- '[::1]:${SQUID_PROCESSOR_PROMETHEUS_PORT}:${SQUID_PROCESSOR_PROMETHEUS_PORT}'
networks:
- joystream
depends_on:
- squid_db
command: >
sh -c "npx squid-typeorm-migration apply && \
node -r dotenv-expand/config lib/processor.js"
squid_graphql-server:
image: joystream/storage-squid:latest
container_name: squid_graphql-server
hostname: squid-graphql-server
restart: unless-stopped
env_file:
- .env
environment:
- DB_NAME=${SQUID_DB_NAME}
- DB_PASS=${SQUID_DB_PASS}
- DB_PORT=${SQUID_DB_PORT}
- DB_HOST=${SQUID_DB_HOST}
- GQL_PORT=${SQUID_GQL_PORT}
- OTEL_EXPORTER_OTLP_ENDPOINT=${TELEMETRY_ENDPOINT}
- TELEMETRY_ENABLED=${TELEMETRY_ENABLED}
depends_on:
- squid_db
command: ['npm', 'run', 'graphql-server-start']
ports:
- '${SQUID_GQL_PORT}:${SQUID_GQL_PORT}'
networks:
- joystream
volumes:
squid_db_data:
# Join default joystream network to connect will Argus/Colossus nodes
networks:
joystream:
external: true
name: joystream_default