From dc4f4c92f748bdf9336d990866a7ce1d1dbf55f1 Mon Sep 17 00:00:00 2001 From: "quentin.schmick" Date: Wed, 29 Jun 2022 12:57:01 -0400 Subject: [PATCH] Updating to allow laravel 9.x --- composer.json | 20 +++++++------------- docker-compose.yml | 12 ++++++++++++ docker/Dockerfile | 31 +++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 docker-compose.yml create mode 100644 docker/Dockerfile diff --git a/composer.json b/composer.json index b8e7989..3d85f39 100644 --- a/composer.json +++ b/composer.json @@ -1,36 +1,30 @@ { - "name": "orisintel/laravel-process-stamps", + "name": "always-open/laravel-process-stamps", "description": "Logs which process created or modified a record", "keywords": [ - "orisintel", + "always-open", "laravel-process-stamps", "laravel", "logging" ], - "homepage": "https://github.com/orisintel/laravel-process-stamps", + "homepage": "https://github.com/always-open/laravel-process-stamps", "license": "MIT", "authors": [ { "name": "Tom Schlick", "email": "tschlick@orisintel.com", "role": "Developer" - }, - { - "name": "ORIS Intelligence", - "email": "developers@orisintel.com", - "homepage": "https://orisintel.com", - "role": "Organization" } ], "require": { - "php": "^7.3", - "laravel/framework": "^8.0" + "php": "^8.0.0|^8.1.0", + "laravel/framework": "^9.0" }, "require-dev": { - "doctrine/dbal": "^2.9", + "doctrine/dbal": "^3.3", "larapack/dd": "^1.0", "mockery/mockery": "~1.0", - "orchestra/testbench": "^6.0", + "orchestra/testbench": "^7.0", "phpunit/phpunit": "^9.0" }, "autoload": { diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..428c6fa --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3.7" +services: + app: + build: + context: ./ + dockerfile: ./docker/Dockerfile + image: processstamps + container_name: processstamps-app + restart: unless-stopped + working_dir: /var/www/ + volumes: + - ./:/var/www diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..eb12261 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,31 @@ +FROM php:8.0-fpm + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + git \ + curl \ + libpng-dev \ + libonig-dev \ + libxml2-dev \ + libzip-dev \ + zip \ + unzip + +# Clear cache +RUN apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install PHP extensions +RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip + +# Get latest Composer +COPY --from=composer:latest /usr/bin/composer /usr/bin/composer + +# Create system user to run Composer and Artisan Commands +RUN useradd -G www-data,root -d /home/ubuntu ubuntu +RUN mkdir -p /home/ubuntu/.composer && \ + chown -R ubuntu:ubuntu /home/ubuntu + +# Set working directory +WORKDIR /var/www + +USER ubuntu