Sign inSign up

priyanshuksharma/project-interns

By priyanshuksharma

โ€ขUpdated about 1 year ago

Comprehensive inventory management system with role-based control, email alerts, and file support.

Image
API management
Web servers
Databases & storage
0

672

priyanshuksharma/project-interns repository overview

โ ๐Ÿณ Docker Complete Guide

โ Marquardt India Pvt. Ltd. - Project Interns

Docker Node.js MySQL Express

๐Ÿš€ One-click deployment โ€ข ๐ŸŒ Global access โ€ข โšก Production-ready

โ ๐ŸŽฏ Quick Navigation

๐Ÿš€ Quick Startโ ๐Ÿ” Servicesโ ๐ŸŒ Global Accessโ 
Get running in 30sUnderstand the stackShare with the world
โš™๏ธ Configurationโ ๐Ÿ“Š Monitoringโ ๐Ÿ› ๏ธ Troubleshootingโ 
Env setupTrack & debugFix common issues

โ โšก Lightning Quick Start

Local Development Mode ๐Ÿ–ฅ๏ธ

# ๐Ÿš€ Launch app + database in one command
docker-compose --profile dev up -d

# โœ… Check containers
docker-compose ps

# ๐Ÿ“‹ View logs
docker-compose logs -f app

๐Ÿ‘‰ App available at: http://localhost:3000โ 


Global Access Mode ๐ŸŒ (Choose your option)

ServiceDifficultyURL TypeBest For
๐Ÿ†“ Serveoโญ BeginnerDynamicQuick demos
๐ŸŽฏ ngrokโญโญ EasyStaticDevelopment
โ˜๏ธ Cloudflareโญโญโญ ProPermanentProduction
# Example: Start with ngrok (Recommended)
docker-compose --profile dev --profile ngrok up -d

โ ๐Ÿ—๏ธ Service Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ๐Ÿ“ฑ App     โ”‚โ—„โ”€โ”€โ–บ โ”‚ ๐Ÿ—„๏ธ Databaseโ”‚โ—„โ”€โ”€โ–บโ”‚ ๐ŸŒ Tunnels   โ”‚
โ”‚  Node.js    โ”‚     โ”‚   MySQL     โ”‚    โ”‚ Global URL  โ”‚
โ”‚  Express    โ”‚     โ”‚   3307      โ”‚    โ”‚ Internet    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  • Node.js App โ†’ Port 3000, hot reload, health checks
  • MySQL DB โ†’ User: sigma, Pass: sigma, Port 3307
  • Adminer (DB UI) โ†’ http://localhost:8080

โ ๐ŸŒ Global Access Tunneling

๐Ÿ”— Example Static URL (via ngrok): https://bright-pleasing-marlin.ngrok-free.appโ 


โ ๐ŸŽฎ Command Cheat Sheet

Local Development ๐Ÿ 

docker-compose --profile dev up -d

Global Access ๐ŸŒ

docker-compose --profile dev --profile ngrok up -d

Production Deployment ๐Ÿญ

docker-compose --profile production up -d

Database Admin ๐Ÿ—„๏ธ

docker-compose --profile admin up -d
# Open http://localhost:8080

Stop Everything ๐Ÿ›‘

docker-compose down -v

โ โš™๏ธ Configuration Setup

.env Template

NODE_ENV=development
SESSION_SECRET=your-secret-key

DB_HOST=mysql
DB_USER=sigma
DB_PASSWORD=sigma
DB_NAME=product_management_system
DB_PORT=3306

NGROK_AUTHTOKEN=your_ngrok_token
NGROK_DOMAIN=bright-pleasing-marlin.ngrok-free.app
CLOUDFLARE_TUNNEL_TOKEN=your_cloudflare_token

โ ๐Ÿ“Š Monitoring & Debugging

Health Checks

docker-compose ps
docker-compose logs -f app

Useful URLs

  • App Health โ†’ http://localhost:3000/health
  • ngrok Dashboard โ†’ http://localhost:4040
  • DB Admin โ†’ http://localhost:8080

โ ๐Ÿ› ๏ธ Troubleshooting Guide

ProblemQuick Fix
Port 3307 in use`netstat -anofindstr :3307` โ†’ kill process
App wonโ€™t startdocker logs project-interns
DB connection failsdocker-compose restart mysql
Tunnel not workingRestart ngrok/serveo/cloudflare

โ ๐Ÿ—๏ธ Architecture

Internet
    โ”‚
    โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   TUNNEL SERVICES                       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚   Serveo.net    โ”‚     ngrok       โ”‚    Cloudflare       โ”‚
โ”‚   (Free)        โ”‚  (Static URL)   โ”‚   (Production)      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โ”‚                       โ”‚                       โ”‚
    โ–ผ                       โ–ผ                       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               DOCKER NETWORK (app-network)              โ”‚
โ”‚                                                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”             โ”‚
โ”‚  โ”‚   Node.js App   โ”‚    โ”‚    MySQL 8.0    โ”‚             โ”‚
โ”‚  โ”‚   (Port 3000)   โ”‚โ—„โ”€โ”€โ”€โ”ค   Database      โ”‚             โ”‚
โ”‚  โ”‚   + Health      โ”‚    โ”‚   (Port 3306)   โ”‚             โ”‚
โ”‚  โ”‚   + Sessions    โ”‚    โ”‚   + Health      โ”‚             โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜             โ”‚
โ”‚                                                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”             โ”‚
โ”‚  โ”‚     Adminer     โ”‚    โ”‚   File Volumes  โ”‚             โ”‚
โ”‚  โ”‚   (Port 8080)   โ”‚    โ”‚   - mysql_data  โ”‚             โ”‚
โ”‚  โ”‚   DB Admin UI   โ”‚    โ”‚   - app_code    โ”‚             โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โ”‚                       โ”‚                       โ”‚
    โ–ผ                       โ–ผ                       โ–ผ
 localhost:3000      localhost:3307         localhost:8080

โ ๐Ÿ”’ Security Best Practices

โœ… Change default passwords โœ… Use strong SESSION_SECRET โœ… Never commit .env โœ… Use HTTPS tunnels for production

# Generate secure session secret
openssl rand -base64 32

โ ๐Ÿš€ Docker Hub Deployment

Image: priyanshuksharma/project-interns Tags: latest, v1.0.0

# Pull latest
docker pull priyanshuksharma/project-interns:latest

# Run locally
docker run -p 3000:3000 priyanshuksharma/project-interns:latest

โ ๐Ÿ“ Project Structure

project-interns/
โ”œโ”€โ”€ docker-compose.yml
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ .env
โ”œโ”€โ”€ sql/
โ”œโ”€โ”€ src/
โ”œโ”€โ”€ views/
โ”œโ”€โ”€ public/
โ””โ”€โ”€ config/

๐ŸŽ‰ Setup Complete!

๐Ÿš€ Dev โ†’ docker-compose --profile dev up -d ๐ŸŒ Share โ†’ docker-compose --profile ngrok up -d ๐Ÿญ Prod โ†’ docker-compose --profile production up -d

Made with โค๏ธ for Marquardt India Pvt. Ltd.

Docker Hub


Tag summary

Content type

Image

Digest

sha256:5c15b045cโ€ฆ

Size

63.7 MB

Last updated

about 1 year ago

docker pull priyanshuksharma/project-interns