I set up the Nginx Reverse Proxy Manager by Jamie Curnow on my Raspberry Pi using docker and docker-compose.
This is the yml stack file:
---
version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
ports:
- '80:80' #HTTP Traffic
- '81:81' #Dashboard Port
- '443:443' #HTTPS Traffic
volumes:
- ./config.json:/app/config/production.json
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
db:
image: 'jc21/mariadb-aria:10.4'
environment:
MYSQL_ROOT_PASSWORD: 'npm'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'npm'
volumes:
- ./data/mysql:/var/lib/mysql
(I use different passwords)
Now, I already once composed it using sudo docker-compose up -d, however, whenever I sudo reboot my Raspberry Pi, it doesn't start as a service.
This is my Raspberry Pi Kernel, btw:
Linux Pi-Server 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/L
And this is my OS version:
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
The interesting part is that whenever I try to recompose it using sudo docker-compose up -d again, I get the following output:
Starting nginx_db_1 ... done
Starting nginx_app_1 ... done
Afterwards, both Nginx and its GUI by Mr. Curnow work.
Is there a more fancy way other than running this docker-compose on startup every time?