Add release compose override without source bind mounts
This commit is contained in:
36
README.md
36
README.md
@ -72,6 +72,8 @@ cp .env.example .env
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
This starts the development-oriented topology (source bind mounts enabled).
|
||||
|
||||
3. If `AUTO_APPLY_MIGRATIONS=0`, run migrations manually:
|
||||
|
||||
```bash
|
||||
@ -91,6 +93,32 @@ docker compose exec web python manage.py createsuperuser
|
||||
- Health: http://localhost/health/
|
||||
- API root endpoints: `/api/players/`, `/api/competitions/`, `/api/teams/`, `/api/seasons/`
|
||||
|
||||
## Development vs Release Compose
|
||||
|
||||
Development startup (mutable source, HTMX/Tailwind workflow):
|
||||
|
||||
```bash
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
Release-style startup (immutable runtime containers, no source bind mount in web/celery runtime):
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.yml -f docker-compose.release.yml up -d --build
|
||||
```
|
||||
|
||||
Optional release-style stop:
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.yml -f docker-compose.release.yml down
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
- In release-style mode, `web`, `celery_worker`, and `celery_beat` run from the built image filesystem.
|
||||
- `tailwind` is marked as `dev` profile in release override and is not started unless `--profile dev` is used.
|
||||
- `nginx`, `postgres`, and `redis` service naming remains unchanged.
|
||||
|
||||
## Setup and Run Notes
|
||||
|
||||
- `web` service starts through `entrypoint.sh` and waits for PostgreSQL readiness.
|
||||
@ -120,6 +148,14 @@ docker compose exec web python manage.py createsuperuser
|
||||
|
||||
This keeps persistent state outside container lifecycles.
|
||||
|
||||
In release-style mode, these volumes remain the persistence layer:
|
||||
|
||||
- `postgres_data` for database state
|
||||
- `static_data` for collected static assets served by nginx
|
||||
- `media_data` for uploaded/provider media
|
||||
- `runtime_data` for Celery beat schedule/runtime files
|
||||
- `redis_data` for Redis persistence
|
||||
|
||||
## Migrations
|
||||
|
||||
Create migration files:
|
||||
|
||||
Reference in New Issue
Block a user