chore: add docker local development files
This commit is contained in:
38
Dockerfile
Normal file
38
Dockerfile
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
FROM php:8.1-apache
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y install \
|
||||||
|
g++ \
|
||||||
|
libcurl4-gnutls-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
libxslt-dev \
|
||||||
|
libzip-dev \
|
||||||
|
zlib1g-dev \
|
||||||
|
msmtp \
|
||||||
|
unzip \
|
||||||
|
git \
|
||||||
|
ssl-cert \
|
||||||
|
locales \
|
||||||
|
--no-install-recommends \
|
||||||
|
&& docker-php-ext-install pdo pdo_mysql mysqli xsl xml zip opcache \
|
||||||
|
&& a2enmod rewrite ssl proxy proxy_http headers \
|
||||||
|
&& apt-get purge -y g++ \
|
||||||
|
&& apt-get autoremove -y \
|
||||||
|
&& rm -r /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Get latest Composer
|
||||||
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
|
# Update the default apache site with the config we created.
|
||||||
|
ADD docker/apache.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
COPY . /var/www/html
|
||||||
|
|
||||||
|
RUN mkdir -p storage/framework/{sessions,views,cache,cache/data} && \
|
||||||
|
chown -R www-data:www-data storage/framework && \
|
||||||
|
chmod -R 775 storage
|
||||||
|
|
||||||
|
# RUN php artisan cache:clear && \
|
||||||
|
# php artisan config:clear && \
|
||||||
|
# php artisan view:clear
|
||||||
@@ -105,7 +105,7 @@ return [
|
|||||||
|
|
||||||
'key' => env('APP_KEY'),
|
'key' => env('APP_KEY'),
|
||||||
|
|
||||||
'cipher' => 'AES-256-CBC',
|
'cipher' => 'aes-256-cbc',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
build: ./
|
||||||
|
ports:
|
||||||
|
- 8080:80
|
||||||
|
- 8443:443
|
||||||
|
volumes:
|
||||||
|
- .:/var/www/html
|
||||||
46
docker/apache.conf
Normal file
46
docker/apache.conf
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
Header set X-Content-Type-Options: "nosniff"
|
||||||
|
Header set X-Frame-Options: "sameorigin"
|
||||||
|
|
||||||
|
ServerTokens Prod
|
||||||
|
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName localhost
|
||||||
|
ServerAdmin support@websight.nl
|
||||||
|
DocumentRoot /var/www/html/public
|
||||||
|
|
||||||
|
<Directory /var/www/html/public/>
|
||||||
|
Options -Indexes +FollowSymLinks +MultiViews
|
||||||
|
AllowOverride All
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog /var/log/apache2/vhost-error.log
|
||||||
|
CustomLog /var/log/apache2/vhost-access.log combined
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
<IfModule mod_ssl.c>
|
||||||
|
<VirtualHost *:443>
|
||||||
|
ServerName localhost
|
||||||
|
ServerAdmin support@websight.nl
|
||||||
|
DocumentRoot /var/www/html/public
|
||||||
|
|
||||||
|
SSLEngine on
|
||||||
|
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||||
|
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
|
||||||
|
SSLCompression off
|
||||||
|
SSLProtocol All -SSLv2 -SSLv3
|
||||||
|
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
|
||||||
|
|
||||||
|
<Directory /var/www/html/public/>
|
||||||
|
Options -Indexes +FollowSymLinks +MultiViews
|
||||||
|
AllowOverride All
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog /var/log/apache2/ssl-vhost-error.log
|
||||||
|
CustomLog /var/log/apache2/ssl-vhost-access.log combined
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
</IfModule>
|
||||||
2
storage/app/.gitignore
vendored
Normal file
2
storage/app/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
2
storage/framework/cache/data/.gitignore
vendored
Normal file
2
storage/framework/cache/data/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
2
storage/framework/sessions/.gitignore
vendored
Normal file
2
storage/framework/sessions/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
2
storage/framework/views/.gitignore
vendored
Normal file
2
storage/framework/views/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
2
storage/logs/.gitignore
vendored
Normal file
2
storage/logs/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
Reference in New Issue
Block a user