A collection of ready-to-use Docker Compose services for development, making it easy to set up popular tools quickly with automatic HTTPS via Caddy Docker Proxy.
Each service is in its own directory with documentation:
- Caddy - Automatic reverse proxy with HTTPS
- PostgreSQL + Adminer - SQL database with web UI
- MongoDB + Mongo Express - NoSQL database with web UI
- Redis + Commander + RedisInsight - In-memory database with web UIs
- RabbitMQ - Message broker with management UI
- ChartDB - Database schema visualization
- Whoami - Simple service for testing Caddy setup
git clone https://github.com/minhlu-i/dkc.git
cd dkcBefore running any services, create the external caddy network:
docker network create caddyOr use the Makefile:
make initStart the Caddy reverse proxy first:
docker compose -f caddy.docker-compose.yml up -dOr use the Makefile:
make caddy# Using Makefile (recommended)
make postgres
make redis
make mongo
# Or using docker compose directly
docker compose -f services/postgres/docker-compose.yml up -d
docker compose -f services/redis/docker-compose.yml up -dCommon Makefile commands:
# Start specific service
make postgres
# Stop specific service
make down-postgres
# View logs
make logs-postgres
# Start all services
make up-all
# Stop all services
make down-all
# Show all available commands
make helpAll services are automatically accessible via HTTPS at https://<service>.localhost:
- Adminer (PostgreSQL): https://adminer.localhost
- Mongo Express: https://mongo-express.localhost
- RabbitMQ Management: https://rabbitmq.localhost
- Redis Commander: https://redis-commander.localhost
- RedisInsight: https://redisinsight.localhost
- ChartDB: https://chartdb.localhost
- Whoami (test): https://whoami.localhost
# Stop specific service
make down-postgres
# Stop all services
make down-all
# Stop all and remove volumes
make cleanThis setup uses caddy-docker-proxy which automatically:
- Detects Docker containers with Caddy labels
- Creates reverse proxy configurations dynamically
- Provisions HTTPS certificates (self-signed for
.localhostdomains) - Routes traffic based on domain names
No manual configuration files needed - just add labels to your services!
Each service uses these labels:
labels:
caddy: <domain>.localhost
caddy.reverse_proxy: "{{upstreams <port>}}"Environment Variables (optional .env file):
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_PORT=5432Login credentials for Adminer:
- Server:
postgres - Username:
postgres(or your POSTGRES_USER) - Password:
postgres(or your POSTGRES_PASSWORD) - Database: Leave empty or specify your database name
Environment Variables (optional .env file):
MONGO_USER=localhost
MONGO_PASSWORD=localhostDefault credentials:
- Username:
rabbitmq - Password:
rabbitmq
- Auto Discovery: Automatically detects containers via Docker socket
- Auto HTTPS: Self-signed certificates for
.localhostdomains - Zero Config: No Caddyfile needed - everything via labels
- Dynamic Updates: Add/remove services without restarting Caddy
Browser warning "Your connection is not private" (NET::ERR_CERT_AUTHORITY_INVALID):
This is normal for .localhost domains with self-signed certificates. You have 3 options:
- Click "Advanced" β "Proceed to [site].localhost (unsafe)"
- Or type
thisisunsafeon the warning page (no input field needed)
-
Extract the Caddy root certificate:
docker compose -f caddy.docker-compose.yml exec caddy cat /data/caddy/pki/authorities/local/root.crt > caddy-root.crt
-
Import to Windows Certificate Store:
- Open file explorer:
explorer.exe . - Double-click
caddy-root.crt - Click "Install Certificate"
- Select "Current User" β Next
- Choose "Place all certificates in the following store" β Browse
- Select "Trusted Root Certification Authorities" β OK
- Next β Finish
- Restart your browser
- Open file explorer:
-
All
.localhostsites will now show secure HTTPS!
sudo cp caddy-root.crt /usr/local/share/ca-certificates/caddy-local.crt
sudo update-ca-certificatesCaddy network not found:
# Create the network
docker network create caddyService not accessible via domain:
# Check if Caddy is running
docker ps | grep caddy
# View Caddy logs
docker compose -f caddy.docker-compose.yml logs -f
# Restart Caddy to pick up new services
docker compose -f caddy.docker-compose.yml restartPort conflicts:
# Check what's using a port
lsof -i :<port_number>
# Example: Check if port 80/443 are available
sudo lsof -i :80
sudo lsof -i :443Docker service not starting:
# View logs
make logs-<service>
# Or with docker compose
docker compose -f services/<service>/docker-compose.yml logs -f
# Check container status
docker ps -a
# Check networks
docker network ls
docker network inspect caddy-
Create service directory:
services/your-service/ -
Add
docker-compose.yml:services: your-service: image: your-image container_name: your-service networks: - service-network - caddy labels: caddy: your-service.localhost caddy.reverse_proxy: "{{upstreams <port>}}" restart: unless-stopped networks: service-network: driver: bridge caddy: external: true
-
Add
README.mdand.env.example(optional) -
Start the service - Caddy will auto-detect it!
make your-service
Got a new service or a helpful tip? Feel free to submit a PR or open an issue!
Happy coding and enjoy your streamlined local environment! π