refactor: Remove Directus infrastructure, simplify Docker deployment
- Remove Directus CMS infrastructure (docker-compose.infrastructure.yml) - Simplify to Astro-only deployment using existing Supabase backend - Clean up docker-compose.override.yml to focus on local development - Update NGINX config to proxy only to Astro app - Remove Directus-related npm scripts and database management tools - Streamline deployment guide for Supabase + Astro architecture Deployment workflow: - Local: npm run docker:dev (Astro + Supabase hosted) - Production: npm run docker:astro:up (Astro only) Benefits: - Simpler architecture with proven Supabase backend - Faster deployments (Astro only) - Zero database downtime - Reduced operational complexity 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# NGINX Configuration for Black Canyon Tickets + Directus
|
||||
# NGINX Configuration for Black Canyon Tickets
|
||||
# Copy to /etc/nginx/sites-available/blackcanyontickets
|
||||
|
||||
server {
|
||||
@@ -20,31 +20,7 @@ server {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
# Directus Admin - Route /admin to Directus
|
||||
location /admin {
|
||||
rewrite ^/admin/(.*) /$1 break;
|
||||
proxy_pass http://localhost:8055;
|
||||
proxy_http_version 1.1;
|
||||
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;
|
||||
client_max_body_size 100M;
|
||||
}
|
||||
|
||||
# Directus API - Route /api/directus to Directus
|
||||
location /api/directus {
|
||||
rewrite ^/api/directus/(.*) /$1 break;
|
||||
proxy_pass http://localhost:8055;
|
||||
proxy_http_version 1.1;
|
||||
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;
|
||||
client_max_body_size 100M;
|
||||
}
|
||||
|
||||
# Main Astro app - All other routes
|
||||
# Astro app - All routes
|
||||
location / {
|
||||
proxy_pass http://localhost:3000;
|
||||
proxy_http_version 1.1;
|
||||
@@ -52,6 +28,19 @@ server {
|
||||
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;
|
||||
|
||||
# Health check endpoint
|
||||
location = /api/health {
|
||||
access_log off;
|
||||
proxy_pass http://localhost:3000;
|
||||
}
|
||||
}
|
||||
|
||||
# Static file optimization
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
proxy_pass http://localhost:3000;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user