This commit is contained in:
Ronald A. Richardson
2023-04-17 19:12:13 +08:00
parent d4b7907f2e
commit e8203317a5
14 changed files with 2238 additions and 21 deletions

2202
api/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,6 +9,8 @@
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^(uploads)($|/) - [L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$

Submodule console updated: 73de7a41ab...7a27f92554

View File

@@ -6,7 +6,7 @@ services:
database:
image: mysql:8.0-oracle
ports:
ports:
- "3306:3306"
volumes:
- "./docker/database/:/docker-entrypoint-initdb.d/"
@@ -16,16 +16,17 @@ services:
application:
volumes:
- '.:/var/www/html'
- .:/var/www/html
build:
context: .
dockerfile: docker/Dockerfile
target: app-dev
args:
ENVIRONMENT: development
ENVIRONMENT: development
environment:
DATABASE_URL: "mysql://root@database/fleetbase_os"
CACHE_DRIVER: redis
CACHE_PATH: /var/www/html/api/storage/framework/cache
CACHE_URL: tcp://cache
REDIS_URL: tcp://cache
SESSION_DOMAIN: localhost
@@ -34,10 +35,15 @@ services:
- cache
httpd:
volumes:
- ./api/storage:/var/www/html/api/storage
build:
context: .
dockerfile: docker/httpd/Dockerfile
dockerfile: docker/httpd/Dockerfile
ports:
- "8000:80"
depends_on:
- application
volumes:
storage:

View File

@@ -29,20 +29,17 @@ RUN curl -L https://github.com/springload/ssm-parent/releases/download/v1.4.3/ss
WORKDIR /var/www
COPY docker/composer-install.sh ./
RUN chmod +x ./composer-install.sh && ./composer-install.sh
# WORKDIR /var/www/html
# COPY . .
COPY packages /var/www/html/packages
WORKDIR /var/www/html/api
RUN chown www-data:www-data /var/www/html
RUN chown www-data:www-data /var/www/html/api
USER www-data
RUN mkdir -p ./storage/logs/ && ln -sf /dev/stdout ./storage/logs/laravel.log
# copy these first to not reinstall everything on a random file change
# COPY api/composer.json api/composer.lock ./
COPY api/composer.json api/composer.lock ./
RUN composer install --no-dev --no-scripts --no-autoloader
COPY --chown=www-data:nogroup . ./
RUN composer dumpautoload
# RUN composer dumpautoload
USER root

View File

@@ -11,6 +11,18 @@ server {
try_files $uri $uri/ /index.php?$args;
}
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) {
@@ -25,4 +37,4 @@ server {
fastcgi_pass application:9000;
fastcgi_index index.php;
}
}
}