Skip to content

Instantly share code, notes, and snippets.

@amotl
Created May 6, 2025 18:21
Show Gist options
  • Save amotl/0db40a5abc91cd9ae5a06051b7c215da to your computer and use it in GitHub Desktop.
Save amotl/0db40a5abc91cd9ae5a06051b7c215da to your computer and use it in GitHub Desktop.
Miniature rig for evaluating cratedb-cockpit on a non-root URL
services:
nginx:
image: nginx:1.27
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "8080:80"
restart: unless-stopped
cratedb-cockpit:
image: surister/cratedbaltadmin:latest
ports:
- "4201:80"
restart: unless-stopped
events { worker_connections 1024; }
http {
upstream cratedb-cockpit {
server cratedb-cockpit:80;
}
server {
listen 80;
location /admin {
rewrite ^/admin/(.*)$ /$1 break;
proxy_pass http://cratedb-cockpit/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}
@amotl
Copy link
Author

amotl commented May 6, 2025

Install

wget https://gist.github.com/amotl/0db40a5abc91cd9ae5a06051b7c215da/raw/compose.yml
wget https://gist.github.com/amotl/0db40a5abc91cd9ae5a06051b7c215da/raw/nginx.conf

Usage

Start services

docker compose up

Navigate

http://localhost:4201/
http://localhost:8080/admin/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment