Add staging environment configuration for Caddy, Nginx, and Traefik with updated routing and logging settings
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
{
|
||||
# Traefik terminates TLS; Caddy should serve plain HTTP internally
|
||||
auto_https off
|
||||
}
|
||||
|
||||
:80 {
|
||||
encode gzip
|
||||
root * /var/www/html
|
||||
|
||||
# CORS is handled at the edge by Traefik's headers middleware.
|
||||
# Do not set or strip Access-Control-* headers here to avoid conflicts.
|
||||
|
||||
# PHP handling via FastCGI to php-fpm pool
|
||||
php_fastcgi php-staging:9000
|
||||
|
||||
try_files {path} {path}/ /index.php
|
||||
file_server
|
||||
|
||||
log {
|
||||
output file /var/log/caddy/access.log {
|
||||
roll_size 10MiB
|
||||
roll_keep 5
|
||||
roll_keep_for 720h
|
||||
}
|
||||
format json
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
echo "Staging environment for Nginx is up and running!";
|
||||
@@ -29,7 +29,7 @@ http:
|
||||
|
||||
api-preflight-io:
|
||||
rule: Host(`api.truckwash.io`) && Method(`OPTIONS`)
|
||||
entryPoints: [websecure]
|
||||
entryPoints: [websecure, websecure-staging]
|
||||
middlewares: [secure-headers]
|
||||
service: noop@internal
|
||||
priority: 1000
|
||||
@@ -80,6 +80,7 @@ http:
|
||||
accessControlAllowOriginList:
|
||||
- "https://truckwash.io"
|
||||
- "https://api.truckwash.io"
|
||||
- "https://api.truckwash.io:4433"
|
||||
- "https://web.truckwash.dk"
|
||||
- "https://api.truckwash.dk"
|
||||
- "https://truckwash.dk"
|
||||
|
||||
@@ -3,6 +3,8 @@ entryPoints:
|
||||
address: ":80"
|
||||
websecure:
|
||||
address: ":443"
|
||||
websecure-staging:
|
||||
address: ":4433"
|
||||
metrics:
|
||||
address: ":9100"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user