Skip to content

Commit f9f02be

Browse files
author
Lloyd Watkin
committed
Update docker implementation
1 parent 3a28b13 commit f9f02be

4 files changed

Lines changed: 10 additions & 13 deletions

File tree

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Based on ubuntu
44
################################################################################
55

6-
FROM dockerfile/java
6+
FROM dockerfile/java:openjdk-7-jdk
77

88
MAINTAINER Lloyd Watkin <lloyd@evilprofessor.co.uk>
99

@@ -13,7 +13,7 @@ RUN apt-get install -y maven
1313

1414
RUN git clone https://github.com/buddycloud/buddycloud-server-java.git
1515
RUN cd buddycloud-server-java && mvn package
16-
ADD ./src/main/resources/log4j.properties .
17-
ADD ./src/main/resources/start.sh .
18-
19-
CMD /bin/bash start.sh
16+
ADD src/main/resources/log4j.properties /data/buddycloud-server-java/
17+
ADD contrib/docker/start.sh /data/
18+
RUN chmod +x start.sh
19+
CMD ./start.sh
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
OPTS=""
44

5-
if [ -z "$DATABASE" ]; then
5+
if [ "$DATABASE" != "" ]; then
66
OPTS=" $OPTS -DDATABASE=\"$DATABASE\""
77
fi
88

9+
cd buddycloud-server-java
910
java $OPTS -jar target/channelserver-jar-with-dependencies.jar

src/main/java/org/buddycloud/channelserver/Configuration.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,7 @@ public boolean getBooleanProperty(final String key, final boolean defaultValue)
213213
String value = getProperty(key);
214214

215215
if (value != null) {
216-
if (value.equalsIgnoreCase("true")) {
217-
return true;
218-
}
219-
if (value.equalsIgnoreCase("false")) {
220-
return false;
221-
}
222-
LOGGER.warn("Invalid boolean property value for " + key + ": " + value);
216+
return Boolean.valueOf(value);
223217
}
224218

225219
return defaultValue;

src/main/java/org/buddycloud/channelserver/utils/configuration/DatabaseLoader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public void load() throws ConfigurationException {
3636
this.conf.removeKey(Configuration.JDBC_USER);
3737
this.conf.removeKey(Configuration.JDBC_PASSWORD);
3838
} catch (SQLException e) {
39+
LOGGER.error(e);
3940
throw new ConfigurationException("Could not get configuration from database");
4041
} finally {
4142
if (null == connection) {
@@ -44,6 +45,7 @@ public void load() throws ConfigurationException {
4445
try {
4546
connection.close();
4647
} catch (SQLException e) {
48+
LOGGER.error(e);
4749
throw new ConfigurationException("Could not get configuration from database");
4850
}
4951
}

0 commit comments

Comments
 (0)