Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTP proxy, multiple connections to client, clustering to server #11

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use openjdk18-openshift for docker base
  • Loading branch information
seanf committed Oct 31, 2017
commit f33d505cb3e4528aa776e41c3eb5b74e6111a834
6 changes: 4 additions & 2 deletions server/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# don't send any files to Docker build daemon, other than the fat jar
*
# don't send any build artifacts to Docker build daemon, other than the fat jar
build
out
src
!build/libs/*-fat.jar
19 changes: 13 additions & 6 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
FROM openjdk:8-jre-alpine
# https://access.redhat.com/containers/?tab=overview&platform=docker#/registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift
FROM registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift:1.1-13

ADD build/libs/server*-fat.jar /app/server.jar
RUN chgrp -R 0 /app/ && chmod -R 775 /app/
ADD build/libs/server*-fat.jar /deployments/
EXPOSE 8080

WORKDIR /app/
# http://vertx.io/docs/vertx-infinispan/java/#_configuring_for_kubernetes_or_openshift_3
# NB run-java.sh will scale heap size to 50% of container memory size
ENV JAVA_OPTIONS "-Dhttp.address=0.0.0.0 \
-Djava.net.preferIPv4Stack=true \
-Dvertx.jgroups.config=default-configs/default-jgroups-kubernetes.xml"

EXPOSE 8080
# You should run this docker container with the env var KUBERNETES_NAMESPACE set to your project name
# eg docker run --memory 128m -e KUBERNETES_NAMESPACE=proxyhook-server --rm -it <image-name>

# NB must use the exec form of ENTRYPOINT if you want to add arguments with CMD
# https://docs.docker.com/engine/reference/builder/#exec-form-entrypoint-example

ENTRYPOINT ["java", "-Dhttp.address=0.0.0.0", "-Xmx64M", "-jar", "server.jar"]
# see https://github.com/fabric8io-images/run-java-sh
ENTRYPOINT ["/opt/run-java/run-java.sh", "-cluster"]