Skip to content

Instantly share code, notes, and snippets.

View nicholascourage's full-sized avatar

Nick Courage nicholascourage

  • Dorset, UK
  • 03:30 (UTC +01:00)
View GitHub Profile
FROM php:8.3-fpm
WORKDIR /var/www/html
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions
RUN apt update \
&& apt install -y \
zlib1g-dev \
g++ \
server {
listen 80;
listen 443 ssl;
index index.php index.html;
server_name laravel-nuxt.local;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/html/public;
# Enable SSL
FROM nginx:latest
WORKDIR /var/www/html
RUN chown -R www-data:www-data /var/www/html
@nicholascourage
nicholascourage / docker-compose.yml
Created April 10, 2024 15:54
Laravel Nuxt docker-compose.yml
version: '3'
networks:
laravel-nuxt:
services:
nginx:
container_name: nginx
build:
#!/bin/bash -xe
## Code Deploy Agent Bootstrap Script##
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
AUTOUPDATE=false
function installdep(){
// Middleware/Cors.php (run php artisan made:middleware Cors from app directory)
public function handle($request, Closure $next){
return $next($request)
->header('Access-Control-Allow-Origin', '*')
->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
}
// Add to $routeMiddelware array in Kernel.php