diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-10-15 16:13:16 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-10-15 16:13:16 +0200 |
commit | 492a682e34d66dd3046ed08f7aee80fb5317f777 (patch) | |
tree | 1476096e94cc5443286634df77a94c46a2a77e70 | |
parent | 67b35a601ad88cd052ceae8d99c1e6df199cf50b (diff) |
Add custom neo4j dockerfile with graphaware and noderank plugins
-rw-r--r-- | Dockerfile.app (renamed from Dockerfile) | 0 | ||||
-rw-r--r-- | Dockerfile.neo4j | 14 | ||||
-rw-r--r-- | docker-compose.yml | 19 |
3 files changed, 25 insertions, 8 deletions
diff --git a/Dockerfile b/Dockerfile.app index 0e47cdb02..0e47cdb02 100644 --- a/Dockerfile +++ b/Dockerfile.app diff --git a/Dockerfile.neo4j b/Dockerfile.neo4j new file mode 100644 index 000000000..0b20d49de --- /dev/null +++ b/Dockerfile.neo4j @@ -0,0 +1,14 @@ +FROM neo4j:latest + +ENV NEO4J_AUTH=none + +RUN cd /var/lib/neo4j/plugins \ + && wget http://products.graphaware.com/download/framework-server-community/graphaware-server-community-all-3.0.6.43.jar \ + && wget http://products.graphaware.com/download/noderank/graphaware-noderank-3.0.6.43.3.jar +RUN echo "dbms.unmanaged_extension_classes=com.graphaware.server=/graphaware" >> /var/lib/neo4j/conf/neo4j.conf +RUN echo 'com.graphaware.runtime.enabled=true\n\ +com.graphaware.module.NR.1=com.graphaware.module.noderank.NodeRankModuleBootstrapper\n\ +com.graphaware.module.NR.maxTopRankNodes=10\n\ +com.graphaware.module.NR.dampingFactor=0.85\n\ +com.graphaware.module.NR.propertyKey=nodeRank\n'\ + >> /var/lib/neo4j/conf/neo4j.conf diff --git a/docker-compose.yml b/docker-compose.yml index 18af16b60..59e0e5496 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,14 +5,14 @@ services: redis: image: redis neo4j: - image: neo4j - environment: - - NEO4J_AUTH=none - app: - build: . - env_file: .env.production + build: + context: . + dockerfile: Dockerfile.neo4j web: - extends: app + build: + context: . + dockerfile: Dockerfile.app + env_file: .env.production command: bundle exec rails s -p 3000 -b '0.0.0.0' ports: - "3000:3000" @@ -24,7 +24,10 @@ services: - ./public/assets:/mastodon/public/assets - ./public/system:/mastodon/public/system sidekiq: - extends: app + build: + context: . + dockerfile: Dockerfile.app + env_file: .env.production command: bundle exec sidekiq -q default -q mailers depends_on: - db |