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'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./config.json:/app/config/production.json
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
db:
image: 'yobasystems/alpine-mariadb:latest'
environment:
MYSQL_ROOT_PASSWORD: 'npm' #password from above
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'npm' #password from 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