generated from bisco/codex-bootstrap
feat: bootstrap HoopScout scouting app
This commit is contained in:
+30
-11
@@ -1,15 +1,34 @@
|
||||
# Deployment
|
||||
|
||||
Describe how this project is deployed.
|
||||
The MVP supports local Docker Compose deployment only.
|
||||
|
||||
Include:
|
||||
## Local Environment
|
||||
|
||||
- environments;
|
||||
- Docker/Compose usage;
|
||||
- required configuration;
|
||||
- secrets handling;
|
||||
- exposed ports;
|
||||
- volumes;
|
||||
- networks;
|
||||
- deployment commands;
|
||||
- rollback procedure.
|
||||
```bash
|
||||
cp .env.example .env
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
Initialize the database:
|
||||
|
||||
```bash
|
||||
docker compose run --rm backend python manage.py migrate
|
||||
docker compose run --rm backend python manage.py seed_demo_data
|
||||
docker compose run --rm backend python manage.py createsuperuser
|
||||
```
|
||||
|
||||
## Exposed Ports
|
||||
|
||||
- `8000`: Django API and admin.
|
||||
- `4200`: Angular development server.
|
||||
|
||||
PostgreSQL is not published to the host.
|
||||
|
||||
## Volumes
|
||||
|
||||
- `postgres_data`: PostgreSQL data.
|
||||
- `frontend_node_modules`: frontend dependencies inside Docker.
|
||||
|
||||
## Rollback
|
||||
|
||||
For code rollback, revert the relevant Git commit and rebuild the Compose services. For local data rollback, restore a database backup or remove the `postgres_data` volume if disposable demo data is acceptable.
|
||||
|
||||
Reference in New Issue
Block a user