docs: fix formatting
This commit is contained in:
51
README.md
51
README.md
@@ -62,40 +62,41 @@ A browser-based railway simulation game using real world railway maps from OpenS
|
||||
|
||||
10. Run quality checks:
|
||||
|
||||
- Backend unit tests: `pytest`
|
||||
- Backend formatters: `black backend/` and `isort backend/`
|
||||
- Frontend lint: `cd frontend && npm run lint`
|
||||
- Frontend type/build check: `cd frontend && npm run build`
|
||||
- Backend unit tests: `pytest`
|
||||
- Backend formatters: `black backend/` and `isort backend/`
|
||||
- Frontend lint: `cd frontend && npm run lint`
|
||||
- Frontend type/build check: `cd frontend && npm run build`
|
||||
|
||||
11. Build for production:
|
||||
|
||||
- Frontend bundle: `cd frontend && npm run build`
|
||||
- Backend container: `docker build -t rail-game-backend backend/`
|
||||
- Frontend bundle: `cd frontend && npm run build`
|
||||
- Backend container: `docker build -t rail-game-backend backend/`
|
||||
|
||||
12. Run containers:
|
||||
|
||||
- Backend: `docker run -p 8000:8000 rail-game-backend`
|
||||
- Frontend: Serve `frontend/dist` with any static file host.
|
||||
- Backend: `docker run -p 8000:8000 rail-game-backend`
|
||||
- Frontend: Serve `frontend/dist` with any static file host.
|
||||
cd frontend
|
||||
npm install
|
||||
cd ..
|
||||
```
|
||||
|
||||
````
|
||||
|
||||
11. Build for production:
|
||||
|
||||
```bash
|
||||
copy .env.example .env # PowerShell: Copy-Item .env.example .env
|
||||
```bash
|
||||
copy .env.example .env # PowerShell: Copy-Item .env.example .env
|
||||
12. Run containers:
|
||||
|
||||
`DATABASE_URL`, `TEST_DATABASE_URL`, and `ALEMBIC_DATABASE_URL` control the runtime, test, and migration connections respectively.
|
||||
`DATABASE_URL`, `TEST_DATABASE_URL`, and `ALEMBIC_DATABASE_URL` control the runtime, test, and migration connections respectively.
|
||||
5. (Optional) Point Git to the bundled hooks: `pwsh scripts/setup_hooks.ps1`.
|
||||
6. Run database migrations to set up the schema:
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
alembic upgrade head
|
||||
cd ..
|
||||
```
|
||||
```bash
|
||||
cd backend
|
||||
alembic upgrade head
|
||||
cd ..
|
||||
````
|
||||
|
||||
7. Refresh OpenStreetMap fixtures (stations + tracks) into the local database:
|
||||
|
||||
@@ -113,20 +114,20 @@ A browser-based railway simulation game using real world railway maps from OpenS
|
||||
9. Open your browser: frontend runs at `http://localhost:5173`, backend API at `http://localhost:8000`.
|
||||
10. Run quality checks:
|
||||
|
||||
- Backend unit tests: `pytest`
|
||||
- Backend formatters: `black backend/` and `isort backend/`
|
||||
- Frontend lint: `cd frontend && npm run lint`
|
||||
- Frontend type/build check: `cd frontend && npm run build`
|
||||
- Backend unit tests: `pytest`
|
||||
- Backend formatters: `black backend/` and `isort backend/`
|
||||
- Frontend lint: `cd frontend && npm run lint`
|
||||
- Frontend type/build check: `cd frontend && npm run build`
|
||||
|
||||
11. Build for production:
|
||||
|
||||
- Frontend bundle: `cd frontend && npm run build`
|
||||
- Backend container: `docker build -t rail-game-backend backend/`
|
||||
- Frontend bundle: `cd frontend && npm run build`
|
||||
- Backend container: `docker build -t rail-game-backend backend/`
|
||||
|
||||
12. Run containers:
|
||||
|
||||
- Backend: `docker run -p 8000:8000 rail-game-backend`
|
||||
- Frontend: Serve `frontend/dist` with any static file host.
|
||||
- Backend: `docker run -p 8000:8000 rail-game-backend`
|
||||
- Frontend: Serve `frontend/dist` with any static file host.
|
||||
|
||||
## Database Migrations
|
||||
|
||||
|
||||
Reference in New Issue
Block a user