Skip to content

Commit

Permalink
rename variables to use system wide vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Its4Nik committed Aug 24, 2024
1 parent faea4d6 commit f409927
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ services:
ports:
- "4444:3000"
environment:
API_URL="http://localhost:7070" # Host of the DockStatAPI endpoint
DEFAULT_THEME="dracula"
SECRET="CHANGME"
- REACT_APP_API_URL="http://localhost:7070" # Host of the DockStatAPI endpoint
- REACT_APP_DEFAULT_THEME="dracula"
- REACT_APP_SECRET="CHANGME"
volumes:
- ./dockstat/icons:/app/build/icons
restart: always
Expand All @@ -45,9 +45,9 @@ services:
Environment Variables:
```yaml
API_URL="http://localhost:7070" # => The url of the API endpoint
DEFAULT_THEME="dracula" # => You can specify the default theme to use here. (dafaults to "dracula")
SECRET="CHANGEME" # => Please set the same key as specified in the dockstatapi
REACT_APP_API_URL="http://localhost:7070" # => The url of the API endpoint
REACT_APP_DEFAULT_THEME="dracula" # => You can specify the default theme to use here. (dafaults to "dracula")
REACT_APP_SECRET="CHANGEME" # => Please set the same key as specified in the dockstatapi
```

ℹ️ Please use HTTPS to fetch data from the API
Expand Down
16 changes: 15 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
"last 1 safari version"
]
}
}
}
6 changes: 3 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import CircularProgress from '@material-ui/core/CircularProgress';
import { toast, ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';

const apihost = process.env.API_URL;
const default_theme = process.env.DEFAULT_THEME || 'dracula';
const key = process.env.SECRET;
const apihost = process.env.REACT_APP_API_URL;
const default_theme = process.env.REACT_APP_DEFAULT_THEME || 'dracula';
const key = process.env.REACT_APP_SECRET;

function App() {
const [data, setData] = useState({});
Expand Down

0 comments on commit f409927

Please sign in to comment.