Our own Supabase Docker Compose files, slightly modified to meet our needs without anything else.
- TypeScript 71.3%
- Elixir 26.2%
- Shell 2.5%
| scripts | ||
| volumes | ||
| .env.example | ||
| .gitignore | ||
| bun.lock | ||
| compose.yaml | ||
| package.json | ||
| README.md | ||
Supabase
What is exposed?
POSTGRES_PORT(default to5432)POOLER_PROXY_PORT_TRANSACTION(default to6543, use this one instead ofPOSTGRES_PORTfor serverless)KONG_HTTP_PORT(default to8000)
They're all configurable in the .env file, check the example one.
Deploy with caddy (preferred)
# /etc/caddy/Caddyfile
dev.throwdown.live {
request_body {
max_size 50MB
}
reverse_proxy localhost:8000 {
header_up Host {host}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
}
}
Deploy with nginx
# /etc/nginx/sites-enabled/dev.throwdown.live
server {
listen 80;
listen [::]:80;
server_name dev.throwdown.live;
client_max_body_size 50M;
location / {
proxy_pass http://localhost:8000;
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;
}
}
You have to generate a SSL certificate using certbot.
Generate new variables
bun run scripts/generate-env.mts dev
bun run scripts/generate-env.mts prod