3 Commits

Author SHA1 Message Date
808b701596 Update Dockerfile.prod 2025-08-31 08:09:56 +02:00
b62549ad90 Add docker/nginx/nginx.conf 2025-08-31 08:09:04 +02:00
f9fb619666 oskarb-patch-1 (#1)
Some checks failed
Deploy App / build-and-deploy (push) Failing after 12s
Reviewed-on: #1
2025-08-31 08:03:48 +02:00
3 changed files with 29 additions and 4 deletions

View File

@@ -62,4 +62,9 @@ COPY --from=frontend /app/public ./public
# Fix permissions for Laravel # Fix permissions for Laravel
RUN chown -R www-data:www-data storage bootstrap/cache RUN chown -R www-data:www-data storage bootstrap/cache
FROM nginx:1.27-alpine AS nginx
WORKDIR /var/www/html
COPY --from=final /var/www/html/public ./public
COPY ./docker/nginx/nginx.conf /etc/nginx/conf.d/default.conf
CMD ["php-fpm"] CMD ["php-fpm"]

View File

@@ -9,10 +9,9 @@ services:
- laravel - laravel
nginx: nginx:
image: nginx:1.27 build:
volumes: context: .
- ../nginx.conf:/etc/nginx/conf.d/default.conf:ro target: nginx
- ./public:/var/www/html/public:ro
ports: ports:
- '${APP_PORT:-80}:80' - '${APP_PORT:-80}:80'
depends_on: depends_on:

21
docker/nginx/nginx.conf Normal file
View File

@@ -0,0 +1,21 @@
server {
listen 80;
server_name scheduler.oskarmikael.com;
root /var/www/html/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass app:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}