initial
This commit is contained in:
16
home-server/envs/local.env
Normal file
16
home-server/envs/local.env
Normal file
@@ -0,0 +1,16 @@
|
||||
# Maria DB settings
|
||||
# For testing purposes only. Please create a .env.mariadb to overwrite these variables
|
||||
MARIADB_ROOT_PASSWORD=testing
|
||||
|
||||
MARIADB_DATABASE=homeassistant
|
||||
MARIADB_USER=homeassistant_user
|
||||
MARIADB_PASSWORD=homeassistant_pw
|
||||
|
||||
GF_SECURITY_ADMIN_USER=test
|
||||
GF_SECURITY_ADMIN_PASSWORD=test
|
||||
GF_USERS_ALLOW_SIGN_UP=false
|
||||
|
||||
DOCKER_INFLUXDB_INIT_USERNAME=homeassistant
|
||||
DOCKER_INFLUXDB_INIT_PASSWORD=homeassistant
|
||||
DOCKER_INFLUXDB_INIT_ORG=homeassistant
|
||||
DOCKER_INFLUXDB_INIT_BUCKET=homeassistant
|
||||
18
home-server/envs/production.env
Normal file
18
home-server/envs/production.env
Normal file
@@ -0,0 +1,18 @@
|
||||
# Maria DB settings
|
||||
# For testing purposes only. Please create a .env.mariadb to overwrite these variables
|
||||
MARIADB_ROOT_PASSWORD=c8gcablGDuJH2tnbAXjPiQ==
|
||||
|
||||
MARIADB_DATABASE=homeassistant
|
||||
MARIADB_USER=homeassistant_user
|
||||
MARIADB_PASSWORD=gyxxny8gO6bzczw+ULuALA==
|
||||
|
||||
GF_SECURITY_ADMIN_USER=admin
|
||||
GF_SECURITY_ADMIN_PASSWORD=QCpuH3Fnet7g9ywlRQ1Gtw==
|
||||
GF_USERS_ALLOW_SIGN_UP=false
|
||||
|
||||
DOCKER_INFLUXDB_INIT_USERNAME=homeassistant
|
||||
DOCKER_INFLUXDB_INIT_PASSWORD=IEOUjgdbI3XjJnmqQOPkHw==
|
||||
DOCKER_INFLUXDB_INIT_ORG=homeassistant
|
||||
DOCKER_INFLUXDB_INIT_BUCKET=homeassistant
|
||||
|
||||
REPO_DIR=/home/pi/repos/homeAutomation
|
||||
46
home-server/envs/readme.md
Normal file
46
home-server/envs/readme.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Server setup
|
||||
|
||||
## Installation docker
|
||||
|
||||
- See [Official Website](https://docs.docker.com/engine/install/ubuntu/)
|
||||
|
||||
## Installation docker compose
|
||||
|
||||
- See [This Website](https://nextgentips.com/2022/05/06/how-to-install-docker-compose-v2-on-ubuntu-22-04/)
|
||||
|
||||
## Setup VPN client
|
||||
|
||||
Follow [this tutorial](https://docs.pivpn.io/wireguard/)
|
||||
|
||||
NOTE: on ubuntu, you need to add a symbolic link in order to enable the VPN ([source](https://superuser.com/a/1544697))
|
||||
|
||||
```bash
|
||||
ln -s /usr/bin/resolvectl /usr/local/bin/resolvconf
|
||||
```
|
||||
|
||||
## Start docker-compose
|
||||
|
||||
TODO add .sh script to start in production
|
||||
|
||||
## Tips
|
||||
|
||||
When database credentials are not updated after docker restart, consider using
|
||||
|
||||
```bash
|
||||
docker compose rm db
|
||||
```
|
||||
|
||||
|
||||
## To Do
|
||||
|
||||
- Start the VPN client automatically after reboot
|
||||
|
||||
## Generate self signed certificates
|
||||
|
||||
https://stackoverflow.com/questions/10175812/how-to-generate-a-self-signed-ssl-certificate-using-openssl
|
||||
|
||||
> non-interactive and 10 years expiration
|
||||
|
||||
```bash
|
||||
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj "/C=homeassistant/ST=Belgium/L=Deerlijk/O=Willem/OU=Willem/CN=willem" -subj '/CN=homeassistant.com'
|
||||
```
|
||||
Reference in New Issue
Block a user