Added Docker-Compose and Greetings

This commit is contained in:
Bastian Meissner 2020-06-08 13:29:00 +02:00
parent 068bd9798f
commit 94377509d9
2 changed files with 27 additions and 2 deletions

View file

@ -38,6 +38,21 @@ $ docker run -d \
phntxx/dashboard phntxx/dashboard
``` ```
Sample Docker Compose configuration:
```
version: "3"
services:
dashboard:
image: phntxx/dashboard:latest
restart: unless-stopped
volumes:
- [path to data directory]:/app/data
ports:
- 3000:3000
```
**Note: You might still need to clone the repository in order to get the JSON-files which are required for the **Note: You might still need to clone the repository in order to get the JSON-files which are required for the
app to run** app to run**

View file

@ -25,8 +25,18 @@ const DateText = styled.h3`
`; `;
const getGreeting = () => { const getGreeting = () => {
// Maybe add some expandability for different greetings? switch (Math.floor(new Date().getHours() / 6)) {
return 'Hello World!'; case 0:
return 'Goor night!';
case 1:
return 'Good morning!';
case 2:
return 'Good afternoon!';
case 3:
return 'Good evening!';
default:
break;
}
}; };
const getExtension = day => { const getExtension = day => {