diff --git a/acp/src/acp.game.list.jsx b/acp/src/acp.game.list.jsx index e180aeca..744a6007 100644 --- a/acp/src/acp.game.list.jsx +++ b/acp/src/acp.game.list.jsx @@ -3,8 +3,6 @@ const { Component } = require('preact'); const { connect } = require('preact-redux'); const linkState = require('linkstate').default; -const axios = require('axios'); - const actions = require('./actions'); const addState = connect( diff --git a/bin/client.sh b/bin/client.sh index a2407748..922b77d3 100755 --- a/bin/client.sh +++ b/bin/client.sh @@ -18,3 +18,4 @@ cd $MNML_PATH/acp rm -rf dist npm i npm run build +mv dist/* $MNML_PATH/client/dist/ diff --git a/bin/deploy.sh b/bin/deploy.sh index 94a2bd26..fd95857d 100755 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -6,12 +6,8 @@ MNML_PATH=$(realpath "$DIR/../") VERSION=$(<"$MNML_PATH/VERSION") SERVER_BIN_DIR="/usr/local/mnml/bin" - CLIENT_DIST_DIR="/var/lib/mnml/client" -CLIENT_PUBLIC_DIR="/var/lib/mnml/public/client" - -ACP_DIST_DIR="/var/lib/mnml/acp" -ACP_PUBLIC_DIR="/var/lib/mnml/public/acp" +CLIENT_PUBLIC_DIR="/var/lib/mnml/public/current" # server updates echo "syncing server $VERSION " @@ -20,14 +16,9 @@ ssh -q mnml ln -nfs "$SERVER_BIN_DIR/$VERSION" "$SERVER_BIN_DIR/mnml" ssh -q mnml ls -lah "$SERVER_BIN_DIR" # client updates -echo "syncing client $VERSION" +echo "syncing client and acp $VERSION" rsync -a --delete --delete-excluded "$MNML_PATH/client/dist/" mnml:"$CLIENT_DIST_DIR/$VERSION/" ssh -q mnml ln -nfs "$CLIENT_DIST_DIR/$VERSION" "$CLIENT_PUBLIC_DIR" - -# acp updates -echo "syncing acp $VERSION" -rsync -a --delete --delete-excluded "$MNML_PATH/acp/dist/" mnml:"$ACP_DIST_DIR/$VERSION/" -ssh -q mnml ln -nfs "$ACP_DIST_DIR/$VERSION" "$ACP_PUBLIC_DIR" ssh -q mnml ls -lah "/var/lib/mnml/public" echo "restarting mnml service" diff --git a/etc/nginx/sites-available/mnml.gg.STAGING.SAMPLE.nginx.conf b/etc/nginx/sites-available/mnml.gg.STAGING.SAMPLE.nginx.conf index 446c2878..7b5ecbfd 100644 --- a/etc/nginx/sites-available/mnml.gg.STAGING.SAMPLE.nginx.conf +++ b/etc/nginx/sites-available/mnml.gg.STAGING.SAMPLE.nginx.conf @@ -1,4 +1,4 @@ -error_log /var/log/mnml/nginx.log; +error_log /var/log/mnml/nginx.log debug; upstream mnml_http { server 127.0.0.1:40000; @@ -8,7 +8,6 @@ upstream mnml_ws { server 127.0.0.1:40055; } - map $http_upgrade $connection_upgrade { default upgrade; '' close; @@ -16,18 +15,14 @@ map $http_upgrade $connection_upgrade { # DEV server { + server_name mnml.gg; + location / { - root /var/lib/mnml/public/client; + root /var/lib/mnml/public/client/; index index.html; try_files $uri $uri/ index.html; } - location /acp { - root /var/lib/mnml/public/acp; - index acp.html; - try_files $uri $uri/ acp.html; - } - location /imgs/ { root /var/lib/mnml/public/; try_files $uri $uri/ =404;