-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Trailglider/patch-2
Store server.jar and data in separate folders
- Loading branch information
Showing
1 changed file
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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"] |