Fixup httpd config and Caddyfile

This commit is contained in:
Eugene Dementyev
2024-02-03 12:04:35 +13:00
parent bc7c6c12ad
commit b623d613f1
4 changed files with 8 additions and 34 deletions

View File

@@ -14,6 +14,7 @@ concourse/
infra/*
vagrant/*
docker/Dockerfile
docker/database/
deploy/*
media/*
data/*
@@ -23,4 +24,4 @@ docker-compose-prod.yml
docker-compose.yml
$virtualenv.tar.gz
$node_modules.tar.gz
docker-compose.override.yml
docker-compose.override.yml

View File

@@ -3,7 +3,7 @@
order php_server before file_server
}
http://localhost:8000 {
http://:8000 {
root * /fleetbase/api/public
encode zstd gzip
php_server {

View File

@@ -12,7 +12,7 @@ services:
- "./docker/database/:/docker-entrypoint-initdb.d/"
- "./docker/database/mysql:/var/lib/mysql"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: "fleetbase"
socket:
@@ -78,8 +78,8 @@ services:
- ./api/storage:/var/www/html/api/storage
build:
context: .
dockerfile: docker/httpd/Dockerfile
dockerfile: docker/httpd/Dockerfile
ports:
- "8000:80"
depends_on:
- application
- application

View File

@@ -13,33 +13,6 @@ server {
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
proxy_pass http://${NGINX_APPLICATION_HOSTNAME}:8000;
}
location /uploads {
alias /var/www/html/api/storage/app/uploads;
autoindex on;
try_files $uri $uri/ /index.php?$query_string;
}
location /storage {
alias /var/www/html/api/storage/app/public;
autoindex on;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
proxy_pass ${NGINX_APPLICATION_HOSTNAME}:8000;
fastcgi_index index.php;
}
}
}