Skip to content

R0MADEV/udemy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

143 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

udemy

Full-stack app with Django REST Framework (API) + Next.js (frontend) + MySQL, running via Docker and routed through devproxy with clean .localhost domains.

Requirements

  • Docker Desktop
  • devproxy running — handles routing to .localhost domains

Quick start

git clone <repo-url>
cd udemy
make setup

That's it. make setup will:

  1. Start devproxy (Traefik)
  2. Build and start all containers
  3. Wait for MySQL to be ready
  4. Import database from backend/udemy.sql
  5. Apply pending migrations
  6. Reset test user passwords

Once done, the app is available at:

URL Description
http://udemy.localhost:8090 Django API
http://udemy-front.localhost:8090 Next.js frontend
http://udemy-phpmyadmin.localhost:8090 phpMyAdmin
http://udemy.localhost:8090/admin Django admin

Test users

All accounts use password romacode:

Email Role
romacode@gmail.com Admin
test@gmail.com User

Commands

Containers

Command Description
make up Start containers
make stop Stop containers
make down Stop and remove containers
make restart Restart containers
make build Rebuild images (no cache)
make ps List running containers

Database

Command Description
make migrate Apply pending migrations
make migrations Generate new migrations
make db-import Re-import backend/udemy.sql

Logs

Command Description
make logs Follow all logs
make log-app Follow Django logs
make log-front Follow frontend logs
make log-db Follow database logs

Shells

Command Description
make app Shell into Django container
make front Shell into frontend container
make db Shell into MySQL container
make sql Open MySQL CLI

Django

Command Description
make shell Open Django shell
make createsuperuser Create admin user
make collectstatic Collect static files

Frontend

Command Description
make npm-install Install npm dependencies
make npm-dev Run dev server
make npm-build Build for production

Stack

Service Image
Python / Django python:3.10.11
MySQL mysql:8.0
Next.js node:18-alpine
phpMyAdmin phpmyadmin:latest

About

Cloned Udemy platform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors