Full-stack app with Django REST Framework (API) + Next.js (frontend) + MySQL, running via Docker and routed through devproxy with clean .localhost domains.
- Docker Desktop
- devproxy running — handles routing to
.localhost domains
git clone <repo-url>
cd udemy
make setup
That's it. make setup will:
- Start devproxy (Traefik)
- Build and start all containers
- Wait for MySQL to be ready
- Import database from
backend/udemy.sql
- Apply pending migrations
- 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 |
All accounts use password romacode:
| Email |
Role |
romacode@gmail.com |
Admin |
test@gmail.com |
User |
| 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 |
| Command |
Description |
make migrate |
Apply pending migrations |
make migrations |
Generate new migrations |
make db-import |
Re-import backend/udemy.sql |
| 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 |
| 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 |
| Command |
Description |
make shell |
Open Django shell |
make createsuperuser |
Create admin user |
make collectstatic |
Collect static files |
| Command |
Description |
make npm-install |
Install npm dependencies |
make npm-dev |
Run dev server |
make npm-build |
Build for production |
| Service |
Image |
| Python / Django |
python:3.10.11 |
| MySQL |
mysql:8.0 |
| Next.js |
node:18-alpine |
| phpMyAdmin |
phpmyadmin:latest |