Add Docker and Coolify deployment setup
Add the container configuration, environment templates, and storage settings needed to deploy SPOTA with Docker and Coolify.
This commit is contained in:
13
docker/apache-vhost.conf
Normal file
13
docker/apache-vhost.conf
Normal file
@@ -0,0 +1,13 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName localhost
|
||||
DocumentRoot /var/www/html
|
||||
|
||||
<Directory /var/www/html>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
33
docker/mysql-init/00-import-spota-databases.sh
Normal file
33
docker/mysql-init/00-import-spota-databases.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
mysql_exec() {
|
||||
mysql -uroot -p"$MYSQL_ROOT_PASSWORD" "$@"
|
||||
}
|
||||
|
||||
import_database() {
|
||||
db_name="$1"
|
||||
create_file="$2"
|
||||
data_file="$3"
|
||||
|
||||
if [ -f "$create_file" ]; then
|
||||
mysql_exec < "$create_file"
|
||||
else
|
||||
mysql_exec -e "CREATE DATABASE IF NOT EXISTS \`$db_name\`;"
|
||||
fi
|
||||
|
||||
if [ -f "$data_file" ]; then
|
||||
mysql_exec "$db_name" < "$data_file"
|
||||
fi
|
||||
}
|
||||
|
||||
import_database "spota_spotadb" "/spota_db/spota_spotadb.create" "/spota_db/spota_spotadb.sql"
|
||||
import_database "spota_konsultasi" "/spota_db/spota_konsultasi.create" "/spota_db/spota_konsultasi.sql"
|
||||
import_database "spota_doxid" "/spota_db/spota_doxid.create" "/spota_db/spota_doxid.sql"
|
||||
import_database "spota_rek_artikel" "/spota_db/spota_rek_artikel.create" "/spota_db/spota_rek_artikel.sql"
|
||||
|
||||
mysql_exec -e "GRANT ALL PRIVILEGES ON \`spota_spotadb\`.* TO '$MYSQL_USER'@'%';"
|
||||
mysql_exec -e "GRANT ALL PRIVILEGES ON \`spota_konsultasi\`.* TO '$MYSQL_USER'@'%';"
|
||||
mysql_exec -e "GRANT ALL PRIVILEGES ON \`spota_doxid\`.* TO '$MYSQL_USER'@'%';"
|
||||
mysql_exec -e "GRANT ALL PRIVILEGES ON \`spota_rek_artikel\`.* TO '$MYSQL_USER'@'%';"
|
||||
mysql_exec -e "FLUSH PRIVILEGES;"
|
||||
13
docker/php.ini
Normal file
13
docker/php.ini
Normal file
@@ -0,0 +1,13 @@
|
||||
display_errors = ${PHP_DISPLAY_ERRORS}
|
||||
log_errors = On
|
||||
error_reporting = E_ALL
|
||||
max_execution_time = 120
|
||||
max_input_time = 120
|
||||
max_input_vars = 5000
|
||||
memory_limit = 512M
|
||||
post_max_size = 32M
|
||||
upload_max_filesize = 32M
|
||||
session.gc_maxlifetime = 604800
|
||||
session.save_path = "/tmp/spota_sessions"
|
||||
allow_url_fopen = On
|
||||
date.timezone = Asia/Jakarta
|
||||
Reference in New Issue
Block a user