diff --git a/Dockerfile b/Dockerfile index 25380e43..5d8eb7e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,12 +27,11 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer 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 \ No newline at end of file +# php artisan view:clear diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 00000000..e4187d34 --- /dev/null +++ b/Dockerfile.dev @@ -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.dev.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 diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 00000000..3f9196ef --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,24 @@ +version: '3.8' + +services: + web: + build: + context: ./ + dockerfile: Dockerfile.dev + ports: + - 8080:80 + - 8443:443 + volumes: + - .:/var/www/html + - ./srv:/srv + db: + image: mysql:5.5 + ports: + - "3306:3306" + expose: + - "3306" + environment: + MYSQL_ROOT_PASSWORD: development-password + MYSQL_DATABASE: forge + MYSQL_USER: forge + MYSQL_PASSWORD: secret diff --git a/docker/apache.dev.conf b/docker/apache.dev.conf new file mode 100644 index 00000000..9b5036c3 --- /dev/null +++ b/docker/apache.dev.conf @@ -0,0 +1,46 @@ +Header set X-Content-Type-Options: "nosniff" +Header set X-Frame-Options: "sameorigin" + +ServerTokens Prod + + + ServerName localhost + ServerAdmin support@websight.nl + DocumentRoot /var/www/html + + + Options -Indexes +FollowSymLinks +MultiViews + AllowOverride All + Order deny,allow + Allow from all + + + ErrorLog /var/log/apache2/vhost-error.log + CustomLog /var/log/apache2/vhost-access.log combined + + + + + ServerName localhost + ServerAdmin support@websight.nl + DocumentRoot /var/www/html + + 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 + + + Options -Indexes +FollowSymLinks +MultiViews + AllowOverride All + Order deny,allow + Allow from all + + + ErrorLog /var/log/apache2/ssl-vhost-error.log + CustomLog /var/log/apache2/ssl-vhost-access.log combined + + + diff --git a/env.example b/env.example new file mode 100644 index 00000000..a67406e4 --- /dev/null +++ b/env.example @@ -0,0 +1,39 @@ +APP_NAME="NH Gooi" +APP_ENV=production +APP_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +APP_DEBUG=false +APP_LOG_LEVEL=error +APP_URL=https://dev.nhgooi.nl +IMAGE_BASE_URL=https://dev.nhgooi.nl + +API_URL=https://api.nhgooi.nl/ + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +SESSION_DRIVER=file +QUEUE_DRIVER=sync + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_DRIVER=smtp +MAIL_HOST=in-v3.mailjet.com +MAIL_PORT=25 +MAIL_USERNAME=mailjet_username +MAIL_PASSWORD=mailjet_password +MAIL_ENCRYPTION=null + +PUSHER_APP_ID= +PUSHER_APP_KEY= +PUSHER_APP_SECRET= + +DB_CONNECTION=mysql +DB_HOST=nhgooi.nl +DB_PORT=3306 +DB_DATABASE=dbname +DB_USERNAME=6fmstats +DB_PASSWORD=dbpass + +CACHE_DRIVER=file +QUEUE_DRIVER=sync diff --git a/phpinfo.php b/phpinfo.php deleted file mode 100644 index c4837a32..00000000 --- a/phpinfo.php +++ /dev/null @@ -1 +0,0 @@ -