-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (59 loc) · 1.72 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
services:
chemist-preprocessor:
container_name: chemist-preprocessor
build:
context: .
dockerfile: Dockerfile
ports:
- "${SERVER_PORT}:8080"
depends_on:
neo4j:
condition: service_healthy
neo4j-migration:
condition: service_completed_successfully
healthcheck:
test: wget -q -O /dev/null http://chemist-preprocessor:8080/health || exit 1
interval: 2s
timeout: 15s
retries: 10
start_period: 15s
neo4j:
container_name: neo4j
image: neo4j:4.1
ports:
- "${NEO4J_HTTP_PORT}:7474"
- "${NEO4J_BOLT_PORT}:7687"
environment:
- NEO4J_dbms_memory_pagecache_size=4G
- NEO4J_dbms_memory_heap_initial__size=4G
- NEO4J_dbms_memory_heap_max__size=6G
- NEO4J_dbms_memory_transaction_max__size=6G
- NEO4J_dbms_security_procedures_default__allowed=true
- NEO4J_AUTH=${NEO4J_USER}/${NEO4J_PASSWORD}
volumes:
- ./neo4j_db/data:/data
- ./neo4j_db/logs:/logs
- ./neo4j_db/import:/var/lib/neo4j/import
- ./neo4j_db/plugins:/plugins
user: "${NEO4J_UID:?error}:${NEO4J_GID:?error}"
healthcheck:
test: wget -q -O /dev/null http://localhost:7474 || exit 1
interval: 2s
timeout: 2s
retries: 10
start_period: 1s
neo4j-migration:
container_name: neo4j-migration
build:
context: .
dockerfile: Dockerfile.migration
depends_on:
neo4j:
condition: service_healthy
entrypoint: [ "sh", "-c", "/scripts/migrate.sh" ]
environment:
- NEO4J_USER=${NEO4J_USER}
- NEO4J_BOLT_PORT=${NEO4J_BOLT_PORT}
- NEO4J_HTTP_PORT=${NEO4J_HTTP_PORT}
- NEO4J_PASSWORD=${NEO4J_PASSWORD}
- NEO4J_HOST=${NEO4J_HOST}