-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added missing Docker files to facilitate a basic docker-compose setup.
Simplified Ruby code.
- Loading branch information
Magnus de Pourbaix
committed
Feb 12, 2016
1 parent
9130056
commit 31b1f28
Showing
9 changed files
with
57 additions
and
20 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
frontend-js: | ||
build: ./frontend-js | ||
ports: | ||
- "8080:8080" | ||
news-server-groovy: | ||
build: ./news-server-groovy | ||
news-server-java: | ||
build: ./news-server-java | ||
news-server-js: | ||
build: ./news-server-js | ||
news-server-rb: | ||
build: ./news-server-rb |
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM java:8 | ||
|
||
ENV VERTICLE_FILE news-server-js-1.0-SNAPSHOT-fat.jar | ||
|
||
# Set the location of the verticles | ||
ENV VERTICLE_HOME /usr/verticles | ||
|
||
#EXPOSE 8080 | ||
|
||
# Copy your fat jar to the container | ||
COPY target/$VERTICLE_FILE $VERTICLE_HOME/ | ||
|
||
# Launch the verticle | ||
WORKDIR $VERTICLE_HOME | ||
ENTRYPOINT ["sh", "-c"] | ||
CMD ["java -jar $VERTICLE_FILE -ha"] |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM java:8 | ||
|
||
ENV VERTICLE_FILE news-server-rb-1.0-SNAPSHOT-fat.jar | ||
|
||
# Set the location of the verticles | ||
ENV VERTICLE_HOME /usr/verticles | ||
|
||
#EXPOSE 8080 | ||
|
||
# Copy your fat jar to the container | ||
COPY target/$VERTICLE_FILE $VERTICLE_HOME/ | ||
|
||
# Launch the verticle | ||
WORKDIR $VERTICLE_HOME | ||
ENTRYPOINT ["sh", "-c"] | ||
CMD ["java -jar $VERTICLE_FILE -ha"] |
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 |
---|---|---|
@@ -1,18 +1,8 @@ | ||
require 'vertx/vertx' | ||
options = { | ||
'haEnabled' => true | ||
} | ||
Vertx::Vertx.clustered_vertx(options) { |res_err,res| | ||
if (res_err == nil) | ||
vertx = res | ||
eventBus = vertx.event_bus() | ||
puts "Ready to send news from Ruby!" | ||
require "vertx/vertx" | ||
include Vertx | ||
|
||
# Send a message every second | ||
vertx.set_periodic(1000) { |v| | ||
eventBus.publish("news-feed", "Some news from Ruby!") | ||
} | ||
else | ||
puts "Failed: #{res_err}" | ||
end | ||
} | ||
puts("Ready to send news from Ruby!") | ||
$vertx::set_periodic(1000) do | ||
eventBus = $vertx.event_bus() | ||
eventBus.publish("news-feed", "News from Ruby!") | ||
end |
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