🐳 Updates port number in docker-compose and on the server-side

This commit is contained in:
Alicia Sykes 2022-04-21 15:49:48 +01:00
parent d64049697c
commit b5bf57bd93
5 changed files with 8 additions and 8 deletions

View File

@ -24,9 +24,9 @@ services:
# - /path/to/my-config.yml:/app/public/conf.yml
# - /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:
- 4000:80
- 4000:8080
# Set any environmental variables
environment:

View File

@ -55,7 +55,7 @@
**Screenshots**: Checkout the [Showcase](https://github.com/Lissy93/dashy/blob/master/docs/showcase.md), to see example dashboards from the community
**Spin up your own demo**: [![One-Click Deploy with PWD](https://img.shields.io/badge/Play--with--Docker-Deploy-2496ed?style=flat-square&logo=docker)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml) or [`docker run -p 8080:80 lissy93/dashy`](./docs/quick-start.md)
**Spin up your own demo**: [![One-Click Deploy with PWD](https://img.shields.io/badge/Play--with--Docker-Deploy-2496ed?style=flat-square&logo=docker)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml) or [`docker run -p 8080:8080 lissy93/dashy`](./docs/quick-start.md)
<p align="center">
@ -69,7 +69,7 @@
## Getting Started 🛫
To deploy Dashy with Docker, just run `docker run -p 8080:80 lissy93/dashy`, then open `http://localhost:8080`
To deploy Dashy with Docker, just run `docker run -p 8080:8080 lissy93/dashy`, then open `http://localhost:8080`
For full list of options and a Docker compose file, see the [Deployment Docs](https://github.com/Lissy93/dashy/blob/master/docs/deployment.md).

View File

@ -4,7 +4,7 @@ events { worker_connections 1024; }
http {
server {
listen 80;
listen 8080;
root /usr/share/nginx/html;
include /etc/nginx/mime.types;
@ -12,4 +12,4 @@ http {
try_files $uri /index.html;
}
}
}
}

View File

@ -36,7 +36,7 @@ const ENDPOINTS = require('./src/utils/defaults').serviceEndpoints; // API endpo
const isDocker = !!process.env.IS_DOCKER;
/* Checks env var for port. If undefined, will use Port 80 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 */
const getLocalIp = () => {

View File

@ -7,7 +7,7 @@
const http = require('http');
/* Location of the server to test */
const port = process.env.PORT || !!process.env.IS_DOCKER ? 80 : 4000;
const port = process.env.PORT || !!process.env.IS_DOCKER ? 8080 : 4000;
const host = process.env.HOST || '0.0.0.0';
const timeout = 2000;