Skip to content

(in progress) DockNRoll is a deployment project that uses Docker Compose to orchestrate a Flask backend, a static frontend, and an Nginx reverse proxy.

Notifications You must be signed in to change notification settings

cutiips/DockNRoll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎸 DockNRoll

This project was created to test deployment using Docker, Nginx, and a Synology NAS, with domain configuration handled via DuckDNS. It consists of a frontend, a backend, and an Nginx configuration for reverse proxying. Service orchestration is managed with Docker Compose.

-> the goal is to create an app hosted on a VM (NAS) and deploy it

Project Structure

  • backend/ (flask): receives the request and checks that the password is valid -> listens internally on port 5000 (flask)
  • frontend/ (html/js/css): displays a simple form and communicates with the backend -> runs on port 80 of the Nginx container (access via reverse proxy)
  • nginx/ (reverse proxy): intermediary between frontend and backend -> manages HTTP access by exposing a single port for the application
  • docker-compose.yml: configuration file to orchestrate the Docker services

Security things

Monitor logs

Nginx : /var/log/nginx/access.log et /var/log/nginx/error.log (or in your Docker containers : docker logs nginx_proxy).

SSH : /var/log/auth.log (to view SSH connections).

Fail2ban : /var/log/fail2ban.log.

UFW

sudo ufw default deny incoming # disable incoming connections by default
sudo ufw default allow outgoing # allow outgoing connections

sudo ufw enable # enable ufw

sudo ufw status verbose # status

sudo ufw status

fail2ban

sudo fail2ban-client status

sudo fail2ban-client status sshd

nginx proxy and container

docker logs nginx_proxy

docker logs frontend

docker logs backend

docker logs duckdns

journals

Sur la VM Ubuntu :

sudo tail -f /var/log/auth.log (SSH)
docker logs -f nginx_proxy (Nginx)
sudo tail -f /var/log/fail2ban.log (Fail2ban)

Sur le NAS :

DSM interface > Control Panel > Logs # Interface DSM > Panneau de configuration > Journal.

Sur Windows :

Event Observer (eventvwr.exe).

docker

docker-compose up -d #enable

docker-compose down #disable

About

(in progress) DockNRoll is a deployment project that uses Docker Compose to orchestrate a Flask backend, a static frontend, and an Nginx reverse proxy.

Topics

Resources

Stars

Watchers

Forks