-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Background
This request is not a user-facing feature. It aims to make it straightforward for new developers to boot a local development environment matching the production dependencies (MySQL 8, Redis, Seq) so they can start working on the repo quickly.
Proposed solution
Add a docker-compose.yml (and optional README section) that brings up:
- MySQL 8 (persisted volume, recommended dev DB & user)
- Redis
- Seq logging server
This should include example connection strings and short instructions for how to run the stack and point the API at these services.
Suggested docker-compose.yml
(Place file at the repository root as docker-compose.yml)
version: '3.8'
services:
db:
image: mysql:8.0
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: newwords
MYSQL_USER: newwords
MYSQL_PASSWORD: newwordspw
command: --default-authentication-plugin=mysql_native_password
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
seq:
image: datalust/seq:latest
restart: unless-stopped
environment:
ACCEPT_EULA: "Y"
ports:
- "5341:80"
volumes:
- seq_data:/data
volumes:
db_data:
redis_data:
seq_data:
Usage notes
- Start services:
- docker compose up -d
- Check services:
- MySQL: localhost:3306
- Redis: localhost:6379
- Seq UI: http://localhost:5341
- Update appsettings.Local.json (or use environment overrides) so the API uses these endpoints. Examples:
- Database: Server=127.0.0.1;Port=3306;Database=newwords;User Id=newwords;Password=newwordspw;
- Redis: 127.0.0.1:6379
- Seq: http://localhost:5341
Migrations / seeding
- The repo uses SqlSugar and Alembic (per repo docs). Document how to run any DB migrations or provide a small init script if needed. Optionally add an "init-db" service or mounting an init SQL script into the MySQL container.
Acceptance criteria
- A docker-compose.yml file exists in the repo root that can bring up MySQL 8, Redis, and Seq with persisted volumes.
- README (or CONTRIBUTING) contains short setup steps and example connection strings for developers.
- Developers can run docker compose up -d and run the API locally with minimal config changes.
- Optional: include a minimal api service in compose (or instructions) so the entire stack can be started via one command.
Security & defaults
- The docker-compose file should use clearly-marked example credentials and document that these are development-only and must not be used in production.
- Consider .env for credentials if reviewers prefer.
Checklist for the issue
- Add docker-compose.yml to repo root
- Add README/CONTRIBUTING section describing how to use compose and sample config
- Add notes about running migrations/seed data