oskarb-patch-3 #3

Merged
oskarb merged 2 commits from oskarb-patch-3 into master 2025-08-31 08:37:59 +02:00
2 changed files with 19 additions and 7 deletions

View File

@@ -62,4 +62,21 @@ COPY --from=frontend /app/public ./public
# Fix permissions for Laravel
RUN chown -R www-data:www-data storage bootstrap/cache
CMD ["php-fpm"]
# ----------------------------
# Stage 4: Nginx with built assets
# ----------------------------
FROM nginx:1.27-alpine AS final-nginx
WORKDIR /var/www/html
# Copy built public folder from final PHP image
COPY --from=final-php /var/www/html/public ./public
# Copy nginx config
COPY ./docker/nginx/nginx.conf /etc/nginx/conf.d/default.conf
# Expose HTTP port
EXPOSE 80
# Start Nginx
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -9,12 +9,7 @@ services:
- laravel
nginx:
image: nginx:1.27
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- storage:/var/www/html/storage:ro
- bootstrap_cache:/var/www/html/bootstrap/cache:ro
- ./public:/var/www/html/public:ro
image: git.oskarmikael.com/oskarb/scheduler:latest
ports:
- '${APP_PORT:-80}:80'
depends_on: