From 1652bb08de7dcddfb9c0dc6da72f5221ae479b25 Mon Sep 17 00:00:00 2001 From: Hugo Peixoto Date: Thu, 21 Dec 2023 21:57:52 +0000 Subject: [PATCH] Initialize repository --- .dockerignore | 3 +++ Dockerfile | 21 +++++++++++++++++++++ apache2.conf | 10 ++++++++++ freescout-entrypoint | 8 ++++++++ 4 files changed, 42 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 apache2.conf create mode 100755 freescout-entrypoint diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..ec1ee75 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +/.git +/Dockerfile +/.dockerignore diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8d02812 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM php:8.3.0-apache + +VOLUME /var/www/html + +RUN docker-php-ext-install mysqli +RUN apt-get update && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libwebp-dev git libc-client-dev libkrb5-dev +RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp +RUN docker-php-ext-install gd +RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl +RUN docker-php-ext-install imap +RUN a2enmod rewrite +RUN a2enmod expires + +ADD freescout-dist /var/www/html +ADD apache2.conf /etc/apache2/sites-enabled/000-default.conf + +ADD freescout-entrypoint /usr/local/bin/ + +EXPOSE 80 + +ENTRYPOINT ["freescout-entrypoint"] diff --git a/apache2.conf b/apache2.conf new file mode 100644 index 0000000..6ed95f3 --- /dev/null +++ b/apache2.conf @@ -0,0 +1,10 @@ + + #ServerName example.com + DocumentRoot "/var/www/html/public" + Options Indexes FollowSymLinks + ErrorLog /var/www/html/storage/logs/web-server.log + + AllowOverride All + Require all granted + + diff --git a/freescout-entrypoint b/freescout-entrypoint new file mode 100755 index 0000000..44abe88 --- /dev/null +++ b/freescout-entrypoint @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +php artisan freescout:clear-cache +php artisan storage:link +php artisan migrate + +exec docker-php-entrypoint