Skip to content

Commit

Permalink
Merge pull request #2 from Trailglider/patch-2
Browse files Browse the repository at this point in the history
Store server.jar and data in separate folders
  • Loading branch information
mpherg committed Apr 15, 2016
2 parents 9b75fb6 + 4172195 commit b0f4329
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ FROM java:8-jre
MAINTAINER Michael Ferguson <[email protected]>

ENV BLYNK_SERVER_VERSION 0.15.2
RUN mkdir /blynk
RUN curl -L https://github.com/blynkkk/blynk-server/releases/download/v${BLYNK_SERVER_VERSION}/server-${BLYNK_SERVER_VERSION}.jar > /blynk/server.jar

# Create data folder. To persist data, map a volume to /data
RUN mkdir /data
RUN curl -L https://github.com/blynkkk/blynk-server/releases/download/v${BLYNK_SERVER_VERSION}/server-${BLYNK_SERVER_VERSION}.jar > /data/server.jar
# Place symbolic link to server config file so that this can be persisted in /data
RUN ln -s /data/server.properties /blynk/server.properties

# By default, mobile application uses port 8443 and is based on SSL/TLS
# sockets. Default hardware port is 8442 and is based on plain TCP/IP
Expand All @@ -12,4 +17,4 @@ RUN curl -L https://github.com/blynkkk/blynk-server/releases/download/v${BLYNK_S
# server. It could be accessible with URL https://your_ip:7443/admin
EXPOSE 7443 8442 8443
WORKDIR /data
ENTRYPOINT ["java", "-jar", "server.jar"]
ENTRYPOINT ["java", "-jar", "/blynk/server.jar", "-dataFolder", "/data"]

0 comments on commit b0f4329

Please sign in to comment.