forked from denostr-lab/denostr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
108 lines (106 loc) · 2.86 KB
/
docker-compose.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
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
services:
denostr-server0:
image: ghcr.io/denostr-lab/denostr:v0.2.4-worker
container_name: denostr-server0
environment:
RELAY_PORT: 8008
NOSTR_CONFIG_DIR: /app/.nostr
SECRET: ${SECRET}
MONGO_URI: "mongodb://denostr-db0:27017,denostr-db1:27017/denostr?authSource=admin&replicaSet=rs0"
MONGO_RR_ENABLED: true
MONGO_MIN_POOL_SIZE: 8
MONGO_MAX_POOL_SIZE: 16
DEBUG: "*"
user: deno:deno
volumes:
- ${PWD}/.nostr/settings.yaml:/app/.nostr/settings.yaml
ports:
- "127.0.0.1:8008:8008"
depends_on:
denostr-db0:
condition: service_healthy
denostr-db1:
condition: service_healthy
denostr-db-rs-init:
condition: service_completed_successfully
restart: on-failure
networks:
default:
denostr-maintenance:
image: ghcr.io/denostr-lab/denostr:v0.2.4-maintenance
container_name: denostr-maintenance
environment:
RELAY_PORT: 8008
NOSTR_CONFIG_DIR: /app/.nostr
SECRET: ${SECRET}
MONGO_URI: "mongodb://denostr-db0:27017,denostr-db1:27017/denostr?authSource=admin&replicaSet=rs0"
DEBUG: "*"
user: deno:deno
volumes:
- ${PWD}/.nostr/settings.yaml:/app/.nostr/settings.yaml
depends_on:
denostr-db0:
condition: service_healthy
denostr-db1:
condition: service_healthy
denostr-db-rs-init:
condition: service_completed_successfully
restart: on-failure
networks:
default:
denostr-db0:
image: mongo:5.0
container_name: denostr-db0
networks:
default:
restart: always
volumes:
- ${PWD}/.nostr/data:/data/db
ports:
- "127.0.0.1:27017:27017"
entrypoint: ["mongod", "--bind_ip_all", "--replSet", "rs0"]
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo --host 127.0.0.1 --port 27017 --quiet 1
interval: 5s
timeout: 5s
retries: 3
start_period: 5s
denostr-db1:
image: mongo:5.0
container_name: denostr-db1
networks:
default:
restart: always
volumes:
- db1:/data/db
entrypoint: ["mongod", "--bind_ip_all", "--replSet", "rs0"]
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo --host 127.0.0.1 --port 27017 --quiet 1
interval: 5s
timeout: 5s
retries: 3
start_period: 5s
denostr-db-rs-init:
image: mongo:5.0
container_name: denostr-db-rs-init
environment:
MONGO_URI: mongodb://denostr-db0:27017,denostr-db1:27017
command: bash /data/mongo-rs-init.sh
volumes:
- ${PWD}/.docker/mongo-rs-init.sh:/data/mongo-rs-init.sh
networks:
default:
depends_on:
denostr-db0:
condition: service_healthy
denostr-db1:
condition: service_healthy
networks:
default:
name: denostr
ipam:
driver: default
config:
- subnet: 10.10.10.0/24
volumes:
db1: