Docker Stack with Nginx and MariaDB
This is a updated guide to the previous Nginx Proxy Manager guide. It has a docker stack that has Nginx Proxy Manager and MariaDB.
This is a updated guide to the previous Nginx Proxy Manager guide. It has a docker stack that has Nginx Proxy Manager and MariaDB. The docker-compose file is a modified example from jc21
A broad costume category can help organise choices for events, group shoots and themed projects. The comparison can include colour, silhouette and the level of preparation required. For event or photo planning, Genshin Impact cosplay costumes(原神 コスプレ衣装) keeps the selection connected to the intended series. It also helps separate series-level browsing from a specific item decision. A useful comparison considers character identity, preparation time and the planned setting. No single design should be treated as representative of every character in the work.
Changes
- A seprated network for the database
backendso no other container has access to the nginx database. frontendnetwork for the container to be exposed to internet for proper proxy.container_nameis added,nginix-proxy-mangerlabelled asnginx-appandmariadb-ariais labelled asnginx-db, you can choose to rename for your deploy.
Deployment
- A) You can clone repo
B) Download thedocker-compose.yml
C) Copy the following into your owndocker-compose.yml
version: '3'
networks:
frontend:
external: true
backend:
services:
npm-app:
image: jc21/nginx-proxy-manager:latest
container_name: nginx-app
depends_on:
- npm-db
restart: always
ports:
- "80:80"
- "81:81"
- "443:443"
environment:
- DB_MYSQL_HOST=npm-db
- DB_MYSQL_PORT=3306
- DB_MYSQL_USER=npm
- DB_MYSQL_PASSWORD=MYSQLPASSWORD
- DB_MYSQL_NAME=npm
volumes:
- ./data:/data
- ./ssl:/etc/letsencrypt
networks:
- frontend
- backend
npm-db:
image: jc21/mariadb-aria:latest
restart: always
container_name: nginx-db
environment:
- MYSQL_ROOT_PASSWORD=ROOTMYSQLPASSWORD
- MYSQL_DATABASE=npm
- MYSQL_USER=npm
- MYSQL_PASSWORD=MYSQLPASSWORD
volumes:
- ./db:/var/lib/mysql
networks:
- backend
- Then you have to make the external network
frontendwith the following command in terminal:
docker network create -d bridge frontend
- Run
docker compose up -din the directory of the docker compose with terminal - Connect to your instance by connecting to the port
81for admin controls.127.0.0.1:81 - the default login is:
Email: admin@example.com
Password: changeme
- You will be asked to change the login credentials right after logging in for the 1st time.
Notes
- Change the
DB_MYSQL_PASSWORD=to a secure password - Change the
MYSQL_ROOT_PASSWORD=to a secure password - Create the external network
frontendbefore deployment otherwise it will not find the network and docker will error out. - For more documentation go to the Nginx Proxy Manager Docs