diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index 7937929d..8d639c3c 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -20,7 +20,6 @@ use Illuminate\Session\Middleware\StartSession; use Illuminate\View\Middleware\ShareErrorsFromSession; use pxlrbt\FilamentSpotlight\SpotlightPlugin; -use ShuvroRoy\FilamentSpatieLaravelBackup\FilamentSpatieLaravelBackupPlugin; use Stephenjude\FilamentDebugger\DebuggerPlugin; class AdminPanelProvider extends PanelProvider @@ -46,7 +45,6 @@ public function panel(Panel $panel): Panel FilamentShieldPlugin::make(), FilamentExceptionsPlugin::make(), DebuggerPlugin::make(), - FilamentSpatieLaravelBackupPlugin::make(), SpotlightPlugin::make(), AdvancedTablesPlugin::make(), ]) diff --git a/deployment/nginx.conf b/deployment/nginx.conf new file mode 100644 index 00000000..e46b5d01 --- /dev/null +++ b/deployment/nginx.conf @@ -0,0 +1,32 @@ +events { + worker_connections 1024; +} + +http { + upstream app_backend { + # Define the replicas of the `app` service + server app:8000; + server app:8000 backup; + } + + server { + listen 80; + + location / { + # Route traffic to the `app_backend` upstream + proxy_pass http://app_backend; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } + + # Optional: Add custom error pages or fallback for failed upstream connections + error_page 502 /502.html; + location = /502.html { + internal; + root /usr/share/nginx/html; + } + } +} \ No newline at end of file diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 3790db71..26e46402 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,20 +1,34 @@ services: + nginx: + image: nginx:alpine + container_name: nginx_lb + ports: + - "80:80" + volumes: + - ./deployment/nginx.conf:/etc/nginx/nginx.conf:ro + networks: + - coconut + depends_on: + - app app: image: nfdi4chem/coconut:latest - container_name: coconut_app env_file: - .env + deploy: + replicas: 2 + update_config: + parallelism: 1 + delay: 10s + restart_policy: + condition: on-failure networks: - coconut - ports: - - '${APP_PORT:-8000}:8000' depends_on: - pgsql - redis - cm worker: image: nfdi4chem/coconut:latest - container_name: coconut_worker env_file: - .env networks: