-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
32 lines (31 loc) · 1.22 KB
/
docker-compose.dev.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
services:
sennet-neo4j-dev:
image: sennet/neo4j-image:5.20.0
hostname: sennet-neo4j-dev
container_name: sennet-neo4j-dev
deploy:
# Modify this based on the actual VM resource
resources:
limits:
memory: 8G
reservations:
memory: 6G
# 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:
- _JAVA_OPTIONS=-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0
# Avoid accidentally creating zombie processes
init: true
# Specifying a restart policy to avoid downtime
restart: always
ports:
- "7474:7474"
- "7687:7687"
volumes:
# Mount the neo4j configuration file to container
- "./dev/neo4j.conf:/usr/src/app/neo4j/conf/neo4j.conf"
# Mount the data to container
- "./dev/data:/usr/src/app/neo4j/data"