summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile6
-rw-r--r--build/supervisord.conf27
-rw-r--r--docker-compose.yml60
m---------opendc-simulator29
4 files changed, 52 insertions, 70 deletions
diff --git a/Dockerfile b/Dockerfile
index 12c2f4d2..49c82935 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,13 +15,11 @@ 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 \
- && npm install \
+ && yarn \
&& export REACT_APP_OAUTH_CLIENT_ID=$(cat ../keys.json | python -c "import sys, json; print json.load(sys.stdin)['OAUTH_CLIENT_ID']") \
- && npm run build
+ && yarn 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 ff4556a4..cfb671d6 100644
--- a/build/supervisord.conf
+++ b/build/supervisord.conf
@@ -1,18 +1,9 @@
-[supervisord]
-nodaemon=true
-
-[program:web-server]
-command=/usr/bin/python2.7 /opendc/opendc-web-server/main.py /opendc/keys.json
-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
-
+[supervisord]
+nodaemon=true
+
+[program:web-server]
+command=/usr/bin/python2.7 /opendc/opendc-web-server/main.py /opendc/keys.json
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0
diff --git a/docker-compose.yml b/docker-compose.yml
index 4b757efe..f1fa0ae7 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,27 +1,33 @@
-version: "2"
-services:
- opendc:
- build: ./
- image: opendc
- ports:
- - "8081:8081"
- links:
- - mariadb
- depends_on:
- - mariadb
- environment:
- - MYSQL_DATABASE=opendc
- - MYSQL_USER=opendc
- - MYSQL_PASSWORD=opendcpassword
- mariadb:
- image: mariadb:10.1
- ports:
- - "3306:3306" # comment this line out in production
- environment:
- - MYSQL_DATABASE=opendc
- - MYSQL_USER=opendc
- - MYSQL_PASSWORD=opendcpassword
- - MYSQL_RANDOM_ROOT_PASSWORD=yes
- # uncomment in production
- # volumes:
- # - "/data/mariadb:/var/lib/mysql"
+version: "2"
+services:
+ opendc:
+ build: ./
+ image: opendc
+ ports:
+ - "8081:8081"
+ links:
+ - mariadb
+ depends_on:
+ - mariadb
+ environment:
+ - MYSQL_DATABASE=opendc
+ - MYSQL_USER=opendc
+ - MYSQL_PASSWORD=opendcpassword
+ opendc-simulator:
+ build: ./opendc-simulator
+ environment:
+ - MYSQL_DATABASE=opendc
+ - MYSQL_USER=opendc
+ - MYSQL_PASSWORD=opendcpassword
+ mariadb:
+ image: mariadb:10.1
+ ports:
+ - "3306:3306" # comment this line out in production
+ environment:
+ - MYSQL_DATABASE=opendc
+ - MYSQL_USER=opendc
+ - MYSQL_PASSWORD=opendcpassword
+ - MYSQL_RANDOM_ROOT_PASSWORD=yes
+ # uncomment in production
+ # volumes:
+ # - "/data/mariadb:/var/lib/mysql"
diff --git a/opendc-simulator b/opendc-simulator
-Subproject 22547de46abf1e0ab517657e2727b0eeaddeeaa
+Subproject 6c78d011f735d14ac45f7eae9ab0d56fd17cc55