A Dockerized Express API with MySQL, authentication (JWT), user management, logging, validation, customizable schema, schema initialization, seeding, and dependency inversion (Clean Architecture).
- Docker Desktop (
Engine
4.25.2)
docker compose build mysql bend
docker compose build --no-cache mysql bend
Start all services:
docker compose up
Start only the backend:
docker compose up bend
Start only MySQL:
docker compose up dem_mysql_cont
NOTE:
- If
docker compose up
fails, ensure .env files and dependencies are properly configured. CTRL+C
to terminate running container
- Using the host's MySQL client:
mysql -u dem -D dem -p -h 127.0.0.1 -P 6633
- Using the MySQL container:
docker exec -it dem_mysql_cont /bin/bash
mysql -u dem -D dem -p -h 127.0.0.1
Use password from .env
file.
docker exec -it dem_bend_cont /bin/bash
NOTE: You can do your local migration here
For details on how validation rules are stored and structured, refer to docs/validation-rules.md
.