-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
114 lines (108 loc) · 3.01 KB
/
compose.yaml
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
109
110
111
112
113
114
# A compose file to ease local development
services:
server:
build:
context: .
target: final
environment:
- APP__ENVIRONMENT=development
- GOOGLE_APPLICATION_CREDENTIALS=/app/gcloud/application_default_credentials.json
- RUST_LOG=nos_followers=debug
- RUST_BACKTRACE=1
volumes:
- ./config:/app/config
- cargo-registry:/usr/local/cargo/registry
- cargo-git:/usr/local/cargo/git/db
- build-cache:/app/target
- ${HOME}/.config/gcloud/application_default_credentials.json:/app/gcloud/application_default_credentials.json
depends_on:
db:
condition: service_healthy
relay:
condition: service_healthy
ports:
- "3000:3000"
- "3001:3001"
restart: always
attach: true
# May not be used locally but it's a good example on how to run it from production with:
# docker compose --profile pagerank-profile run pagerank
pagerank:
build:
context: .
target: final
environment:
- APP__followers__neo4j_uri=db:7687
- APP__followers__neo4j_user=neo4j
- APP__followers__neo4j_password=mydevpassword
- APP__ENVIRONMENT=development
- GOOGLE_APPLICATION_CREDENTIALS=/app/gcloud/application_default_credentials.json
- RUST_LOG=nos_followers=debug
- RUST_BACKTRACE=1
volumes:
- ./config:/app/config
- cargo-registry:/usr/local/cargo/registry
- cargo-git:/usr/local/cargo/git/db
- build-cache:/app/target
- ${HOME}/.config/gcloud/application_default_credentials.json:/app/gcloud/application_default_credentials.json
entrypoint: ["/bin/pagerank"]
depends_on:
db:
condition: service_healthy
restart: "no"
profiles:
- pagerank-profile
relay:
image: ghcr.io/planetary-social/nosrelay:latest
environment:
- REDIS_URL=redis://redis:6379
- RELAY_URL=ws://localhost:7777
ports:
- "7777:7777"
depends_on:
redis:
condition: service_healthy
redis:
image: redis:latest
ports:
- "6379:6379"
healthcheck:
test: redis-cli ping
interval: 10s
timeout: 10s
retries: 10
start_period: 60s
db:
image: neo4j:latest
platform: linux/amd64
ports:
- 7474:7474
- 7687:7687
environment:
- NEO4J_AUTH=neo4j/mydevpassword
- NEO4J_apoc_export_file_enabled=true
- NEO4J_apoc_import_file_enabled=true
- NEO4J_apoc_import_file_use__neo4j__config=true
- NEO4J_PLUGINS=["apoc", "graph-data-science"]
- NEO4J_dbms_logs_debug_level=DEBUG
- NEO4J_dbms_logs_query_enabled=VERBOSE
- NEO4J_dbms_logs_query_threshold=0
volumes:
- db-data:/data
- db-logs:/logs
- db-import:/var/lib/neo4j/import
- db-plugins:/plugins
healthcheck:
test: wget http://localhost:7474 || exit 1
interval: 10s
timeout: 10s
retries: 10
start_period: 60s
volumes:
db-data:
db-logs:
db-import:
db-plugins:
cargo-registry:
cargo-git:
build-cache: