docker-compose.yml [chapter] deterministic
version: "3.8" services: backend: build: context: . dockerfile: Dockerfile.backend ports: - "8000:8000" environment: - DJANGO_SETTINGS_MODULE=ai_backend.settings - DEBUG=1 volumes: - ./ai_backend:/app
version: "3.8" services: backend: build: context: . dockerfile: Dockerfile.backend ports: - "8000:8000" environment: - DJANGO_SETTINGS_MODULE=ai_backend.settings - DEBUG=1 volumes: - ./ai_backend:/app restart: unless-stopped frontend: build: context: . dockerfile: Dockerfile.frontend ports: - "3000:3000" environment: - NEXT_PUBLIC_API_URL=http://backend:8000 depends_on: - backend restart: unless-stopped
`
Run the stack:
```bash docker compose up --build
`
The backend will be reachable at http://localhost:8000 and the frontend at http://localhost:3000. The frontend's API calls are configured to use the backend container name (backend) via the environment variable NEXT_PUBLIC_API_URL. In a production deployment you would replace this with a domain and set up HTTPS
Source Code and Repositories
This chapter draws from the following open-source projects by DanielKliewer:
- **dynamic_persona_moe_rag**: https://github.com/kliewerdaniel/dynamic_persona_moe_rag
- **workflow**: https://github.com/kliewerdaniel/workflow
- **sovereign**: https://github.com/kliewerdaniel/sovereign
- **sovereignSpec**: https://github.com/kliewerdaniel/sovereignSpec
- **cogGra**: https://github.com/kliewerdaniel/cogGra
- **RedToBlog02**: https://github.com/kliewerdaniel/RedToBlog02
For more projects, visit https://github.com/kliewerdaniel
---