diff options
| -rw-r--r-- | Dockerfile | 6 | ||||
| -rw-r--r-- | build/supervisord.conf | 27 | ||||
| -rw-r--r-- | docker-compose.yml | 60 | ||||
| m--------- | opendc-simulator | 29 |
4 files changed, 52 insertions, 70 deletions
@@ -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 |
