add MySQL container to docker-compose and fix backend container/image name

- Add mysql:8.0 service with health check and named volume for data persistence
- Backend depends_on db with service_healthy condition
- Override SD_DB_HOST=db so backend connects to MySQL container via Docker network
- Rename backend container and image to superdreamfront
- Update .env.example to note "db" host for docker-compose usage

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
xuyong
2026-04-15 21:56:55 +08:00
parent 7097fa6b44
commit b5553c144c
2 changed files with 29 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ SD_PORT=18000
# Database (MySQL)
SD_DB_TYPE=mysql
SD_DB_HOST=localhost
SD_DB_HOST=localhost # use "db" when running with docker-compose
SD_DB_PORT=3306
SD_DB_USER=root
SD_DB_PASSWORD=