-
-
Notifications
You must be signed in to change notification settings - Fork 53
Installation
This page covers the installation of Dashboard. The recommended way of installation is using Docker. You could also build your own version from source, but do proceed at your own risk.
The Docker image is built on top of this image, as it's based on Nginx and also provides functionality to purge the Cloudflare cache every time the container restarts (though this functionality is entirely optional).
- Using the Docker CLI
$ docker run -d \
-e CLOUDFLARE_ZONE_ID=[OPTIONAL CLOUDFLARE V4 ZONE ID] \
-e CLOUDFLARE_PURGE_TOKEN=[OPTIONAL CLOUDFLARE PURGE TOKEN] \
-v $(pwd)/data:/app/data
-p 8080:8080 \
--name dashboard \
phntxx/dashboard
- Using
docker-compose
version: "3"
services:
dashboard:
image: phntxx/dashboard:latest
restart: unless-stopped
environment:
- CLOUDFLARE_ZONE_ID=[OPTIONAL CLOUDFLARE V4 ZONE ID]
- CLOUDFLARE_PURGE_TOKEN=[OPTIONAL CLOUDFLARE PURGE TOKEN]
volumes:
- [path to data directory]:/app/data
ports:
- 8080:8080
To install dashboard manually from source, you need to clone the git repository and build dashboard on your machine first:
$ git clone https://github.com/phntxx/dashboard.git
$ cd dashboard/
$ yarn
$ yarn build
Then, you can choose to either run the build using Nginx or yarn
:
- Using
yarn serve:production
In the directory of the git repository, run
$ yarn serve:production
- Using Nginx
In the directory of the git repository, copy the contents of the build
repository into the git repository, move the git repository to /var/www/dashboard/html
and change the rights of the repository:
$ cp -R build/* .
$ cd ..
$ mkdir /var/www/dashboard
$ mv dashboard/ /var/www/dashboard/html
$ chown -R www-data:www-data /var/www/dashboard
Then, create a new file, /etc/nginx/conf.d/dashboard.conf
, with the following contents:
server {
server_name localhost;
listen 8080;
root /var/www/dashboard/html/;
location / {
index index.html index.htm;
}
}
Finally, reload your Nginx service:
$ systemctl nginx reload