diff --git a/.env.sample b/.env.sample index d1ff225..3e6b9a8 100644 --- a/.env.sample +++ b/.env.sample @@ -14,7 +14,7 @@ ALLOW_REGISTRATION=true AUTH_2FA_ISSUER=RetroPilot HTTP_INTERFACE=0.0.0.0 -HTTP_PORT=3000 +HTTP_PORT=8080 # Set to false to skip sending mail, all attempted mail is logged under DEBUG CAN_SEND_MAIL=true @@ -26,16 +26,16 @@ SMTP_PASS= SMTP_FROM="no-reply@retropilot.org" # base url of the retropilot server -BASE_URL="http://192.168.1.165:3000/" +BASE_URL="http://192.168.1.165:8080/" # base url sent to devices for POSTing drives & logs -BASE_UPLOAD_URL="http://192.168.1.165:3000/backend/post_upload" +BASE_UPLOAD_URL="http://192.168.1.165:8080/backend/post_upload" # base download url for drive & log data -BASE_DRIVE_DOWNLOAD_URL="http://192.168.1.165:3000/realdata/" +BASE_DRIVE_DOWNLOAD_URL="http://192.168.1.165:8080/realdata/" # path mapping of above download url for expressjs, prefix with "/" BASE_DRIVE_DOWNLOAD_PATH_MAPPING="/realdata" # relative or absolute ( "/..." for absolute path ) STORAGE_PATH="realdata/" -CABANA_URL="http://192.168.1.165:3000/cabana/index.html" +CABANA_URL="http://192.168.1.165:8080/cabana/index.html" DEVICE_STORAGE_QUOTA_MB=200000 DEVICE_EXPIRATION_DAYS=30 diff --git a/Dockerfile b/Dockerfile index 02eb7ec..3872c40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,5 +23,5 @@ RUN npm run build COPY --from=cabana /cabana/build cabana -EXPOSE 3000 +EXPOSE 8080 CMD ["npm", "run", "server"] diff --git a/data/nginx/app.conf b/data/nginx/app.conf index 64234fc..b26294d 100644 --- a/data/nginx/app.conf +++ b/data/nginx/app.conf @@ -18,7 +18,7 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass http://server:3000; + proxy_pass http://server:8080; } ssl_certificate /etc/letsencrypt/live/uat.api.retropilot.org/fullchain.pem; @@ -26,4 +26,4 @@ server { include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; -} \ No newline at end of file +} diff --git a/docker-compose.yml b/docker-compose.yml index 4b56620..118a0ed 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: volumes: - retropilot-realdata:/realdata ports: - - "3000:3000" + - "8080:8080" - "4040:4040" env_file: - .env @@ -30,7 +30,7 @@ services: image: postgres:14-bullseye restart: always ports: - - '5438:5432' + - "5432:5432" volumes: - ./sql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql - retropilot-db:/var/lib/postgresql/data diff --git a/src/server/app.js b/src/server/app.js index 7161d94..f91ad3d 100644 --- a/src/server/app.js +++ b/src/server/app.js @@ -54,7 +54,7 @@ if (process.env.ATHENA_ENABLED) { logger.log('Athena disabled'); } -app.use(cors({ origin: 'http://localhost:3000' })); +app.use(cors({ origin: 'http://localhost:8080' })); app.use(cookieParser()); app.use('/favicon.ico', express.static('static/favicon.ico')); app.use(process.env.BASE_DRIVE_DOWNLOAD_PATH_MAPPING, express.static(process.env.STORAGE_PATH));