From 4c5f91eea6ce76599ef76ee645744b9547a0958d Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 28 Sep 2017 18:03:25 +0200 Subject: Add Kotlin simulator Docker configuration This change adds the Docker configuration for the Kotlin simulator to the repository. --- Dockerfile | 8 +++++--- build/supervisord.conf | 9 +++++++++ opendc-simulator | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index b2461767..12c2f4d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ && echo "deb http://ftp.debian.org/debian stretch main" >> /etc/apt/sources.list \ && apt-get update \ - && apt-get install -y python python-pip yarn git sqlite3 sed supervisor mysql-client \ + && apt-get install -y python python-pip yarn git sed supervisor openjdk-8-jdk mysql-client \ && pip install oauth2client eventlet flask-socketio mysql-connector-python-rf \ && rm -rf /var/lib/apt/lists/* @@ -15,11 +15,13 @@ COPY ./ /opendc # Setting up simulator RUN chmod 555 /opendc/build/configure.sh \ + && cd /opendc/opendc-simulator \ + && ./gradlew build \ && cd /opendc/opendc-frontend \ && rm -rf ./build \ && rm -rf ./node_modules \ - && yarn \ + && npm install \ && export REACT_APP_OAUTH_CLIENT_ID=$(cat ../keys.json | python -c "import sys, json; print json.load(sys.stdin)['OAUTH_CLIENT_ID']") \ - && yarn build + && npm run build CMD ["sh", "-c", "cd /opendc && ./build/configure.sh && /usr/bin/supervisord -c /opendc/build/supervisord.conf"] diff --git a/build/supervisord.conf b/build/supervisord.conf index 37b5cc16..ff4556a4 100644 --- a/build/supervisord.conf +++ b/build/supervisord.conf @@ -7,3 +7,12 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 + +[program:simulator] +directory=/opendc/opendc-simulator/opendc-integration-jpa +command=/opendc/opendc-simulator/gradlew run +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 + diff --git a/opendc-simulator b/opendc-simulator index 504598b3..22547de4 160000 --- a/opendc-simulator +++ b/opendc-simulator @@ -1 +1 @@ -Subproject commit 504598b320c689cca3d1bbf523a4dd82f69d7a61 +Subproject commit 22547de46abf1e0ab517657e2727b0eeaddeeaa0 -- cgit v1.2.3