Skip to content

Commit

Permalink
Merge branch 'feat/docker'
Browse files Browse the repository at this point in the history
  • Loading branch information
any1 committed May 4, 2020
2 parents 0f741f9 + cb5bfc3 commit 523d545
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 14 deletions.
37 changes: 27 additions & 10 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
FROM maven:3-jdk-13-alpine
ENV DEBIAN_FRONTEND noninteractive
ENV ELASTIC_DIR=/xel-lite-wallet
#
# Source code
#
FROM alpine/git as sources

RUN apk add dos2unix git
RUN git clone --depth 1 https://github.com/xel-software/xel-lite-wallet /code

RUN git clone --depth 1 https://github.com/xel-software/xel-lite-wallet ${ELASTIC_DIR}
RUN cd ${ELASTIC_DIR} && mvn package
#
# Maven build
#
FROM maven:3.6.3-adoptopenjdk-11 as build

COPY start-lite-wallet.sh ${ELASTIC_DIR}/start-lite-wallet.sh
RUN dos2unix ${ELASTIC_DIR}/start-lite-wallet.sh
COPY --from=sources /code/ /build/

WORKDIR ${ELASTIC_DIR}
ENTRYPOINT sh start-lite-wallet.sh
RUN cd /build && mvn package

#
# Final image
#
FROM adoptopenjdk:11-jre-openj9-bionic
RUN mkdir /opt/app

COPY --from=build /build/xel-lite-wallet.jar /opt/app/xel-lite-wallet.jar
COPY --from=sources /code/docker/start-lite-wallet.sh /opt/app/start-lite-wallet.sh
COPY --from=sources /code/run.sh /opt/app/run.sh
COPY --from=sources /code/conf/ /opt/app/conf/
COPY --from=sources /code/html/ /opt/app/html/
COPY --from=sources /code/logs/ /opt/app/logs/

WORKDIR /opt/app
ENTRYPOINT bash start-lite-wallet.sh
2 changes: 1 addition & 1 deletion docker/start-lite-wallet.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

cd /xel-lite-wallet
#cd /xel-lite-wallet

echo "set config..."

Expand Down
5 changes: 2 additions & 3 deletions src/nxt/db/TransactionalDb.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,8 @@ public void endTransaction() {
statsTime = now;
}
}
if (logStats)
Logger.logDebugMessage(String.format("Average database transaction time is %.3f seconds",
(double)times/1000.0/(double)count));
//if (logStats)
// Logger.logDebugMessage(String.format("Average database transaction time is %.3f seconds", (double)times/1000.0/(double)count));
}
DbUtils.close(con);
}
Expand Down

0 comments on commit 523d545

Please sign in to comment.