Deploy DevGuard with Docker Compose
Run DevGuard locally using Docker Compose for testing and evaluation.
This setup is for testing and evaluation only. For production deployments, use the Helm chart.
Prerequisites
- Docker and Docker Compose installed
Deployment Steps
Download required files
curl -LO https://raw.githubusercontent.com/l3montree-dev/devguard/refs/heads/main/docker-compose-try-it.yaml \
&& curl -LO https://raw.githubusercontent.com/l3montree-dev/devguard/refs/heads/main/initdb.sql \
&& curl -LO https://raw.githubusercontent.com/l3montree-dev/devguard/refs/heads/main/.kratos/identity.schema.json \
&& curl -L -o kratos.yml https://raw.githubusercontent.com/l3montree-dev/devguard/refs/heads/main/.kratos/kratos.example.yml \
&& mkdir -p kratos \
&& mv kratos.yml kratos/kratos.yml \
&& mv identity.schema.json kratos/identity.schema.jsonStart the containers
docker-compose -f docker-compose-try-it.yaml upAccess DevGuard
Open http://localhost:3000 in your browser.
Important Notes
Email verification: No SMTP server is configured by default. During registration, skip email verification by clicking “Back”.
To enable email delivery, add COURIER_SMTP_CONNECTION_URI to the kratos service:
services:
kratos:
environment:
- COURIER_SMTP_CONNECTION_URI=smtp://user:password@smtp.example.com:587/?skip_ssl_verify=falseVulnerability database: The API downloads the latest vulnerability database on first start. This may take several minutes. Vulnerability data and scan results won’t be complete until the download finishes.
Adapting for Production
If you must use Docker Compose in production, change all default passwords:
POSTGRES_PASSWORDin thepostgresqlservice- Database password in
initdb.sql DSNin bothkratosandkratos-migrateservices- Remove
--devflag from the kratos command
# Example password locations in docker-compose-try-it.yaml
services:
postgresql:
environment:
POSTGRES_PASSWORD: your-secure-password # Change this
kratos:
environment:
DSN: postgres://kratos:your-secure-password@postgresql:5432/kratos?sslmode=disable
command: serve -c /etc/config/kratos/kratos.yml --watch-courier # Remove --devNever run the default docker-compose-try-it.yaml in production. The default passwords are publicly known.
Next Steps
- Run your first scan: Getting Started Guide