This repository has been archived by the owner on Jan 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.localhost.yml
62 lines (57 loc) · 2.24 KB
/
docker-compose.localhost.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
version: '3.7'
# https://docs.docker.com/compose/compose-file/compose-file-v3/
services:
ontology-neo4j:
container_name: ontology-neo4j
build: neo4j
restart: unless-stopped
ports:
- 7474:7474
- 7687:7687
volumes:
- neo4j-data:/data
healthcheck:
# https://docs.docker.com/engine/reference/builder/#healthcheck
test: ["CMD", "curl", "--fail", "http://localhost:7474/", "||", "exit 1"]
# test: curl --fail -s http://localhost:7474/ || exit 1
# test: perl -MIO::Socket::INET -e 'exit(! defined( IO::Socket::INET->new("localhost:7687")))'
interval: 10s
timeout: 10s
retries: 10
deploy:
resources:
limits:
memory: 8G
# Allow the JVM to read cgroup limits
# -XX:+UseContainerSupport is enabled by default on linux machines,
# this feature was introduced in java10 then backported to Java-8u191, the base image comes with OpenJDK(build 1.8.0_232-b09)
# -XX:MaxRAMPercentage (double) is depending on the max memory limit assigned to the contaienr
# When the container has > 1G memory, set -XX:MaxRAMPercentage=75.0 is good (doesn't waste too many resources)
environment:
- NEO4J_USER=${NEO4J_USER:-neo4j}
# Used for setting the initial neo4j password, defaut to HappyG0at
- NEO4J_PASSWORD=${NEO4J_PASSWORD:-HappyG0at}
# Allow the JVM to read cgroup limits
# -XX:+UseContainerSupport is enabled by default on linux machines,
# this feature was introduced in java10 then backported to Java-8u191, the base image comes with OpenJDK(build 1.8.0_232-b09)
# -XX:MaxRAMPercentage (double) is depending on the max memory limit assigned to the contaienr
# When the container has > 1G memory, set -XX:MaxRAMPercentage=75.0 is good (doesn't waste too many resources)
- _JAVA_OPTIONS=-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0
ontology-api:
container_name: ontology-api
build: server
restart: unless-stopped
environment:
- HOST_GID=${HOST_GID:-1000}
- HOST_UID=${HOST_UID:-1000}
volumes:
# Persist the logging
- "./server/log:/usr/src/app/log"
deploy:
resources:
limits:
memory: 256M
ports:
- 8080:8080
volumes:
neo4j-data: