Skip to content

Commit

Permalink
Update Running with Docker (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
hygt authored Aug 15, 2018
1 parent 2ddc5e3 commit ecf10ea
Show file tree
Hide file tree
Showing 6 changed files with 250 additions and 167 deletions.
11 changes: 3 additions & 8 deletions .jvmopts
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
# see https://weblogs.java.net/blog/kcpeppe/archive/2013/12/11/case-study-jvm-hotspot-flags
-Dfile.encoding=UTF8
-Xms1G
-Xms2G
-Xmx6G
-XX:MaxMetaspaceSize=2G
-XX:ReservedCodeCacheSize=350M
-XX:+TieredCompilation
-XX:+UseG1GC
-XX:MaxMetaspaceSize=2G
-XX:-UseGCOverheadLimit
# effectively adds GC to Perm space
-XX:+CMSClassUnloadingEnabled
# must be enabled for CMSClassUnloadingEnabled to work
-XX:+UseConcMarkSweepGC

83 changes: 0 additions & 83 deletions src/main/paradox/assets/docker-compose-v1.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions src/main/paradox/assets/running_locally/docker-compose.yaml

This file was deleted.

105 changes: 105 additions & 0 deletions src/main/paradox/running_locally/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
version: "3.3"
services:
kg:
image: "bluebrain/kg-nexus:latest"
deploy:
resources:
limits:
memory: 1G
environment:
- "CASSANDRA_CONTACT_POINT1=cassandra:9042"
- "BIND_INTERFACE=0.0.0.0"
- "PUBLIC_URI=http://localhost"
- "IAM_BASEURI=http://iam:8080/v0"
- "SPARQL_BASE_URI=http://blazegraph:9999/bigdata"
- "SPARQL_ENDPOINT=http://blazegraph:9999/bigdata/sparql"
- "ELASTIC_BASE_URI=http://elasticsearch:9200"
- "JAVA_OPTS=-Xms256m -Xmx512m"

iam:
image: "bluebrain/iam-nexus:latest"
deploy:
resources:
limits:
memory: 1G
entrypoint:
- /bin/sh
- -c
- |
echo Sleeping for 30 seconds
sleep 30
echo Starting IAM
./bin/iam-service
environment:
- "CASSANDRA_CONTACT_POINT1=cassandra:9042"
- "BIND_INTERFACE=0.0.0.0"
- "PUBLIC_URI=http://localhost"
- "IAM_TESTMODE=true"
- "ELASTIC_BASE_URI=http://elasticsearch:9200"
- "KAFKA_BOOTSTRAP_SERVERS=kafka:9092"
- "JAVA_OPTS=-Xms256m -Xmx512m"

elasticsearch:
image: "elasticsearch:latest"
deploy:
resources:
limits:
memory: 1G
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"

cassandra:
image: "cassandra:3.11"
deploy:
resources:
limits:
memory: 1G
environment:
- "MAX_HEAP_SIZE=512m"
- "HEAP_NEWSIZE=128m"

kafka:
image: "spotify/kafka:latest"
deploy:
resources:
limits:
memory: 1G
environment:
- "ADVERTISED_HOST=kafka"
- "ADVERTISED_PORT=9092"
- "KAFKA_HEAP_OPTS=-Xms256m -Xmx512m"

blazegraph:
image: "bluebrain/blazegraph-nexus:latest"
deploy:
resources:
limits:
memory: 2G

landing-page:
image: bluebrain/nexus-landing-page:latest
environment:
- "BASE_PATH="
- "BASE_URI=http://localhost"

explorer:
image: bluebrain/nexus-explorer:latest
environment:
- "BASE_PATH=/explorer"
- "BASE_URI=http://localhost"

router:
image: "nginx:stable-alpine"
ports:
- target: 80
published: 80
mode: host
deploy:
mode: global
configs:
- source: nginx
target: /etc/nginx/conf.d/default.conf

configs:
nginx:
file: ./nginx.conf
21 changes: 21 additions & 0 deletions src/main/paradox/running_locally/docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
server {
listen 80;
server_name localhost;

# Nexus routing
location / {
proxy_pass http://landing-page:8000;
}
location /explorer {
proxy_pass http://explorer:8000;
}
location /v0 {
proxy_pass http://kg:8080;
}
location /v0/acls {
proxy_pass http://iam:8080;
}
location /v0/oauth2 {
proxy_pass http://iam:8080;
}
}
Loading

0 comments on commit ecf10ea

Please sign in to comment.