5.) Installing Nginx
- connect via ssh to your pi
- we create now a directory for nginx, a config.json file and a docker-compose.yml
- type in: mkdir nginx
- type in: cd nginx
- type in: nano config.json- paste in:
{"database": {"engine": "mysql","host": "db","name": "npm","user": "npm","password": "npm", #please change the password her"port": 3306}}
- save and exit the file- type in: nano docker-compose.yml
- paste in:
version: '3'"3"
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: always
ports:
# Public HTTP Port:
- '80:80'-# '81:81'Public HTTPS Port:
- '443:443'volumes:# Admin Web Port:
- .'81:81'
environment:
# These are the settings to access your db
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "npm" #change it
DB_MYSQL_NAME: "npm"
# If you would rather use Sqlite uncomment this
# and remove all DB_MYSQL_* lines above
# DB_SQLITE_FILE: "/config.json:/app/config/production.jsondata/database.sqlite"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: 'yobasystems/alpine-mariadb:jc21/mariadb-aria:latest'
restart: always
environment:
MYSQL_ROOT_PASSWORD: 'npm' #password from above
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'npm' #password#same fromas above
volumes:
- ./data/mysql:/var/lib/mysql
- save and exit the file
- type in: sudo docker-compose up -d
- type in: sudo docker update --restart always nginx_app_1
- type in: sudo docker update --restart always nginx_db_1
- type in: sudo reboot now
- now you have access via webbrowser for your nginx proxy manager : http://ip-adress-of-your-pi:81
- on first login the credentials are
username: admin@example.com
passwrod: changeme
- create your hosts you need