diff --git a/.dockerignore b/.dockerignore index 17079a2f..1545a440 100644 --- a/.dockerignore +++ b/.dockerignore @@ -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 \ No newline at end of file +docker-compose.override.yml diff --git a/Caddyfile b/Caddyfile index 3ec5b7f7..1ef2c950 100644 --- a/Caddyfile +++ b/Caddyfile @@ -3,7 +3,7 @@ order php_server before file_server } -http://localhost:8000 { +http://:8000 { root * /fleetbase/api/public encode zstd gzip php_server { diff --git a/docker-compose.yml b/docker-compose.yml index 1b00f231..17932c4d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 \ No newline at end of file + - application diff --git a/docker/httpd/vhost.conf b/docker/httpd/vhost.conf index 0f00ee94..7a21f93e 100644 --- a/docker/httpd/vhost.conf +++ b/docker/httpd/vhost.conf @@ -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; - } -} \ No newline at end of file +}