Major Initial Push
This is the first push with most of the edits/variables in place. Most of whats left is filling out the `README.md` file for the variables and what they mean and/or need. - Moved most of the editable/user configurable options to variables inside of the `docker-compose.example.env` file - Wrote the explainer for the directory creation and the user creation that is necessary
This commit is contained in:
parent
8d99963fb8
commit
ed23c39500
|
|
@ -1 +1,26 @@
|
||||||
# Synology Docker Compose Example
|
# Synology Docker Compose Example
|
||||||
|
|
||||||
|
This folder is an example `docker-compose.yml` file and a `.env` file for using docker through a Synology Server.
|
||||||
|
|
||||||
|
## Directions
|
||||||
|
First, create the directories where you want the containers to save everything. I use the same base directory for them, like: `/volume1/Docker/grafana`, then inside the `./grafana` directory: `./grafana` and `./influxdb`. Its best to use the command line over SSH to create these directories, AFTER you have the primary shared directory already created. (`Control Panel -> Shared Folder -> Create`)
|
||||||
|
|
||||||
|
`sudo mkdir -p /volume[#]/[Shared Directory]/Grafana/{grafana,influxdb}`
|
||||||
|
|
||||||
|
Where `/volume[#]` is the volume number,
|
||||||
|
`[Shared Directory]` is the shared directory from above, and then
|
||||||
|
`{grafana,influxdb}` needs to be copied as-is, curly brackets and all.
|
||||||
|
|
||||||
|
You still have to [do this prep work](https://github.com/unifi-poller/unifi-poller/wiki/Synology-HOWTO#method-2) creating the `unifipoller` user, which I'll re-iterate here:
|
||||||
|
|
||||||
|
#. Create a new user account on the Synology from the Control Panel:
|
||||||
|
- Name the user `grafana`
|
||||||
|
- Set the password (you don't need to logon as grafana and change it)
|
||||||
|
- `Disallow Password Change`
|
||||||
|
- Assign them to the user group `users`
|
||||||
|
- Give them `r/w` permission to the folder you created e.g. `/docker/grafana`
|
||||||
|
- Don't assign them **anything** else - the point of this user is for security's sake.
|
||||||
|
#. SSH into your Synology
|
||||||
|
#. Run the following command to find the PID of the user you created and set the variable `GRAFANA_LOCAL_USERID` in your `.env` file:
|
||||||
|
- `sudo id grafana`
|
||||||
|
- `GRAFANA_LOCAL_USERID=1026`
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,17 @@ INFLUXDB_HTTP_AUTH_ENABLED=true
|
||||||
INFLUXDB_ADMIN_USER=unifi-poller
|
INFLUXDB_ADMIN_USER=unifi-poller
|
||||||
INFLUXDB_ADMIN_PASSWORD=changeme
|
INFLUXDB_ADMIN_PASSWORD=changeme
|
||||||
INFLUXDB_DB=unifi
|
INFLUXDB_DB=unifi
|
||||||
|
INFLUXDB_LOCAL_VOLUME=/local/storage/location/influxdb
|
||||||
|
|
||||||
#grafana
|
#grafana
|
||||||
GRAFANA_USERNAME=grafana_username
|
GRAFANA_USERNAME=grafana_username
|
||||||
GRAFANA_PASSWORD=changeme
|
GRAFANA_PASSWORD=changeme
|
||||||
|
GRAFANA_NETWORK=Grafana_Net
|
||||||
|
GRAFANA_LOCAL_VOLUME=/local/storage/location/grafana
|
||||||
|
GRAFANA_LOCAL_USERID=1026
|
||||||
|
GRAFANA_SERVER_DOMAIN=boards.url.com
|
||||||
|
GF_RENDERING_CALLBACK_URL=boards.url.com
|
||||||
|
GF_RENDERING_SERVER_URL=boards.url.com
|
||||||
|
|
||||||
#unifi-poller
|
#unifi-poller
|
||||||
POLLER_TAG=latest
|
POLLER_TAG=latest
|
||||||
|
|
|
||||||
|
|
@ -4,36 +4,34 @@ services:
|
||||||
influxdb:
|
influxdb:
|
||||||
restart: always
|
restart: always
|
||||||
image: influxdb:latest
|
image: influxdb:latest
|
||||||
ports:
|
|
||||||
- '3456:8086'
|
|
||||||
volumes:
|
volumes:
|
||||||
- /volume2/General/influxdb:/var/lib/influxdb
|
- ${INFLUXDB_LOCAL_VOLUME}:/var/lib/influxdb
|
||||||
environment:
|
environment:
|
||||||
- INFLUXDB_DATA_DIR=/var/lib/influxdb/data
|
- INFLUXDB_DATA_DIR=/var/lib/influxdb/data
|
||||||
- INFLUXDB_DATA_WAL_DIR=/var/lib/influxdb/wal
|
- INFLUXDB_DATA_WAL_DIR=/var/lib/influxdb/wal
|
||||||
- INFLUXDB_DATA_META_DIR=/var/lib/influxdb/meta
|
- INFLUXDB_DATA_META_DIR=/var/lib/influxdb/meta
|
||||||
networks:
|
networks:
|
||||||
- Grafana_Net
|
- ${GRAFANA_NETWORK}
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana:latest
|
image: grafana/grafana:latest
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- '3000:3000'
|
- '3000:3000'
|
||||||
volumes:
|
volumes:
|
||||||
- /volume2/General/grafana:/var/lib/grafana
|
- ${GRAFANA_LOCAL_VOLUME}:/var/lib/grafana
|
||||||
depends_on:
|
depends_on:
|
||||||
- influxdb
|
- influxdb
|
||||||
user: "1029"
|
user: "${GRAFANA_LOCAL_USERID}"
|
||||||
environment:
|
environment:
|
||||||
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
|
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
|
||||||
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
|
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
|
||||||
- GF_INSTALL_PLUGINS=grafana-clock-panel,natel-discrete-panel,grafana-piechart-panel
|
- GF_INSTALL_PLUGINS=grafana-clock-panel,natel-discrete-panel,grafana-piechart-panel
|
||||||
- GF_SERVER_DOMAIN=boards.jpcdi.com
|
- GF_SERVER_DOMAIN=${GRAFANA_SERVER_DOMAIN}
|
||||||
- GF_ENFORCE_DOMAIN=true
|
- GF_ENFORCE_DOMAIN=true
|
||||||
- GF_RENDERING_CALLBACK_URL=boards.jpcdi.com
|
- GF_RENDERING_CALLBACK_URL=${GF_RENDERING_CALLBACK_URL}
|
||||||
- GF_RENDERING_SERVER_URL=boards.jpcdi.com
|
- GF_RENDERING_SERVER_URL=${GF_RENDERING_SERVER_URL}
|
||||||
networks:
|
networks:
|
||||||
- Grafana_Net
|
- ${GRAFANA_NETWORK}
|
||||||
unifi-poller:
|
unifi-poller:
|
||||||
restart: always
|
restart: always
|
||||||
image: golift/unifi-poller:latest
|
image: golift/unifi-poller:latest
|
||||||
|
|
@ -47,6 +45,6 @@ services:
|
||||||
- UP_POLLER_DEBUG=${POLLER_DEBUG}
|
- UP_POLLER_DEBUG=${POLLER_DEBUG}
|
||||||
- UP_UNIFI_DEFAULT_SAVE_DPI=${POLLER_SAVE_DPI}
|
- UP_UNIFI_DEFAULT_SAVE_DPI=${POLLER_SAVE_DPI}
|
||||||
networks:
|
networks:
|
||||||
- Grafana_Net
|
- ${GRAFANA_NETWORK}
|
||||||
networks:
|
networks:
|
||||||
Grafana_Net:
|
${GRAFANA_NETWORK}:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue