buat docker
This commit is contained in:
20
docker/apache/000-default.conf
Normal file
20
docker/apache/000-default.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /var/www/html/public
|
||||
|
||||
<Directory /var/www/html/public>
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
Options -Indexes +FollowSymLinks
|
||||
</Directory>
|
||||
|
||||
RemoteIPHeader X-Forwarded-For
|
||||
RemoteIPTrustedProxy 10.0.0.0/8
|
||||
RemoteIPTrustedProxy 172.16.0.0/12
|
||||
RemoteIPTrustedProxy 192.168.0.0/16
|
||||
|
||||
SetEnvIf X-Forwarded-Proto "https" HTTPS=on
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
30
docker/entrypoint.sh
Normal file
30
docker/entrypoint.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
cd /var/www/html
|
||||
|
||||
mkdir -p \
|
||||
storage/app/public \
|
||||
storage/framework/cache/data \
|
||||
storage/framework/sessions \
|
||||
storage/framework/testing \
|
||||
storage/framework/views \
|
||||
storage/logs \
|
||||
bootstrap/cache
|
||||
|
||||
chown -R www-data:www-data storage bootstrap/cache
|
||||
|
||||
if [ "${RUN_LARAVEL_STORAGE_LINK:-true}" = "true" ]; then
|
||||
php artisan storage:link --force >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
if [ "${RUN_LARAVEL_MIGRATIONS:-false}" = "true" ]; then
|
||||
php artisan migrate --force
|
||||
fi
|
||||
|
||||
if [ "${APP_ENV:-production}" = "production" ]; then
|
||||
php artisan config:cache
|
||||
php artisan view:cache
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
17
docker/nginx/chatbotadmin.conf.example
Normal file
17
docker/nginx/chatbotadmin.conf.example
Normal file
@@ -0,0 +1,17 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name chatbotadmin.example.com;
|
||||
|
||||
client_max_body_size 55M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
}
|
||||
}
|
||||
14
docker/php/production.ini
Normal file
14
docker/php/production.ini
Normal file
@@ -0,0 +1,14 @@
|
||||
memory_limit=512M
|
||||
max_execution_time=300
|
||||
max_input_time=300
|
||||
upload_max_filesize=50M
|
||||
post_max_size=55M
|
||||
date.timezone=Asia/Kuala_Lumpur
|
||||
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.memory_consumption=256
|
||||
opcache.interned_strings_buffer=16
|
||||
opcache.max_accelerated_files=20000
|
||||
opcache.validate_timestamps=0
|
||||
opcache.revalidate_freq=0
|
||||
Reference in New Issue
Block a user