ADORSYS-GIS / ADORSYS-GIS/cloud-identity-wallet

Docker and Docker Compose configuration

Offen
#373 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @Hermann-Core Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Rust
Sterne
4
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Priority:** P1 — High

### Description

Provide production-grade Docker and Docker Compose configurations for the cloud-identity-wallet server, enabling one-command local development and reproducible deployment.

### Scope

1. **Multi-stage `Dockerfile`**:
- Build stage: `rust:1.92` (or later) with `cargo-chef` for layer caching
- Runtime stage: `debian:bookworm-slim` or `from scratch` for minimal image
- Expose configurable port (default 3000)
- Health check endpoint
- Non-root user for security
- Support both `memory-backend` (dev) and `sql-backend` (prod) feature sets via build-time `ARG`

2. **`compose.yml`** for local development:
- `wallet` service building from local Dockerfile
- `redis` service (Redis 8+ with RESP3)
- `mysql` service or `postgres` service (configurable via `.env`)
- `localstack` service for AWS KMS emulation (when `aws-kms` feature is used locally)
- Volumes for data persistence
- Network isolation

4. **`.dockerignore`** — exclude target/, .git, .env, etc.

5. **Documentation** — update README with Docker quickstart:
```bash
cp .env.example .env # edit as needed
docker compose up # starts wallet + redis + mysql
```

### Acceptance Criteria

- [ ] `docker build .` succeeds and produces a working image
- [ ] `docker compose up` starts wallet with memory backends (no DB required) and responds to health check
- [ ] `docker compose --profile sql up` starts wallet + redis + mysql and the wallet connects successfully
- [ ] Docker image runs as non-root user
- [ ] Build cache works (second build after code change only rebuilds affected layers)
- [ ] README updated with Docker instructions

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by reading the existing server startup, feature flags, .env.example, and README to learn the expected port, health endpoint, and backend configuration. The requested work is to add Dockerfile, compose.yml, .dockerignore, and README quickstart docs. Done means the listed docker build and docker compose commands work for memory and sql profiles, run non-root, and pass the health check.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, docker, docker-compose, mysql, postgres, redis, rust
Bereich
build-system, devops, documentation, infrastructure
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
32/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.