enhacements: Production/Staging Docker Compose Improvements
- Dominant language
- Python
- Stars
- 451
- Forks
- 707
- Avg merge
- 22h 59m
- Merged PRs (30d)
- 91
Description
## Description
Below are some suggestions before raising the production and staging Docker Compose configs PR as part of the broader Docker improvements. This suggestion related to **what will change** and **what will stay the same** so we can align before merging.
## Change items
### 1. **Volumes: bind mounts → named volumes**
| Current (bind mount) | Planned (named volume) |
|----------------------|-------------------------|
| `./volumes/cache:/data` | `cache-data:/data` |
| `./volumes/db:/var/lib/postgresql/data` | `db-data:/var/lib/postgresql/data` |
| `./backend/data:/home/owasp/data` | `backend-data:/home/owasp/data` |
**Reason:** Better portability, easier backup/restore, fewer permission issues, and often better performance. Named volumes are managed by Docker instead of host paths.
**Migration:** If you already have data in `./volumes/` or `./backend/data`, you’ll need to migrate it into the new named volumes (or accept starting fresh). New deployments can use the new config.
### 2. **Adding Healthcheck for backend and frontend services**
### 3. **Adding Resource limits (Optional, need more discussion on this section)**
## What remains the same
No other changes are planned. The following stay as it is:
- **Images** : Same image names and tags
- **Networks** : Same Docker Compose networks and topology
- **Environment** : Same env files and variable usage
- **Redis / PostgreSQL** : Same images and config; only the volume type changes (bind mount → named volume)
- **Ports and restart policy** : Unchanged
I'd be happy to start a discussion and get feedback on this proposed approach. 😄
Contributor guide
Research direction
Start by locating the production and staging Docker Compose configuration and compare the current bind mounts, service definitions, networks, environment files, ports, and restart policies. Validate the proposed named volumes and backend/frontend healthchecks with Docker Compose, then determine how existing data in ./volumes/ and ./backend/data would be migrated; resource limits remain unresolved and need maintainer agreement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, postgresql, redis
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100