mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-31 01:24:42 +02:00
🔧 Change internal port to 8080, for non-sudo access
This commit is contained in:
parent
6a0fef6356
commit
39dbb4c4fc
@ -28,7 +28,7 @@ RUN yarn build
|
|||||||
FROM node:16.13.2-alpine
|
FROM node:16.13.2-alpine
|
||||||
|
|
||||||
# Define some ENV Vars
|
# Define some ENV Vars
|
||||||
ENV PORT=80 \
|
ENV PORT=8080 \
|
||||||
DIRECTORY=/app \
|
DIRECTORY=/app \
|
||||||
IS_DOCKER=true \
|
IS_DOCKER=true \
|
||||||
USER=docker \
|
USER=docker \
|
||||||
|
@ -24,9 +24,9 @@ services:
|
|||||||
# - /path/to/my-config.yml:/app/public/conf.yml
|
# - /path/to/my-config.yml:/app/public/conf.yml
|
||||||
# - /path/to/item-icons:/app/public/item-icons
|
# - /path/to/item-icons:/app/public/item-icons
|
||||||
|
|
||||||
# Set port that web service will be served on. Keep container port as 80
|
# Set port that web service will be served on. Keep container port as 8080
|
||||||
ports:
|
ports:
|
||||||
- 4000:80
|
- 4000:8080
|
||||||
|
|
||||||
# Set any environmental variables
|
# Set any environmental variables
|
||||||
environment:
|
environment:
|
||||||
|
@ -35,8 +35,8 @@ const ENDPOINTS = require('./src/utils/defaults').serviceEndpoints; // API endpo
|
|||||||
/* Checks if app is running within a container, from env var */
|
/* Checks if app is running within a container, from env var */
|
||||||
const isDocker = !!process.env.IS_DOCKER;
|
const isDocker = !!process.env.IS_DOCKER;
|
||||||
|
|
||||||
/* Checks env var for port. If undefined, will use Port 80 for Docker, or 4000 for metal */
|
/* Checks env var for port. If undefined, will use Port 8080 for Docker, or 4000 for metal */
|
||||||
const port = process.env.PORT || (isDocker ? 80 : 4000);
|
const port = process.env.PORT || (isDocker ? 8080 : 4000);
|
||||||
|
|
||||||
/* Attempts to get the users local IP, used as part of welcome message */
|
/* Attempts to get the users local IP, used as part of welcome message */
|
||||||
const getLocalIp = () => {
|
const getLocalIp = () => {
|
||||||
|
@ -12,7 +12,7 @@ module.exports = (app) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const isDocker = !!process.env.IS_DOCKER;
|
const isDocker = !!process.env.IS_DOCKER;
|
||||||
const SSLPort = process.env.SSL_PORT || (isDocker ? 443 : 4001);
|
const SSLPort = process.env.SSL_PORT || (isDocker ? 8081 : 4001);
|
||||||
|
|
||||||
const printSuccess = () => {
|
const printSuccess = () => {
|
||||||
console.log(`🔐 HTTPS server successfully started (port: ${SSLPort} ${isDocker ? 'of container' : ''})`);
|
console.log(`🔐 HTTPS server successfully started (port: ${SSLPort} ${isDocker ? 'of container' : ''})`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user