mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
chang to .env
This commit is contained in:
parent
9607d2ebd2
commit
46d6c163e3
4 changed files with 25 additions and 45 deletions
14
conf/.env
Normal file
14
conf/.env
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Database configuration
|
||||
DB_DRIVER=pgsql
|
||||
DB_HOST=localhost
|
||||
DB_PORT=5432
|
||||
DB_DATABASE=__DB_NAME__
|
||||
DB_USERNAME=__DB_USER__
|
||||
DB_PASSWORD=__DB_PWD__
|
||||
|
||||
# Daemon configuration
|
||||
DAEMON_URL=https://__DOMAIN____PATH__/ # Public URL of your Movim instance
|
||||
DAEMON_PORT=__PORT__ # Port on which the daemon will listen
|
||||
DAEMON_INTERFACE=127.0.0.1 # Interface on which the daemon will listen, must be an IP
|
||||
DAEMON_DEBUG=false
|
||||
DAEMON_VERBOSE=false
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
# This is the database configuration of Movim
|
||||
# You need to copy an rename this file to 'db.inc.php' and complete the values
|
||||
$conf = [
|
||||
# The type can be 'pgsql' or 'mysql'
|
||||
'type' => 'pgsql',
|
||||
# The database username
|
||||
'username' => '__DB_USER__',
|
||||
# The password
|
||||
'password' => '__DB_PWD__',
|
||||
# Where can we find the database ?
|
||||
'host' => 'localhost',
|
||||
# The port number, 3306 for MySQL and 5432 for PostgreSQL
|
||||
'port' => 5432,
|
||||
# The database name
|
||||
'database' => '__DB_NAME__'
|
||||
];
|
|
@ -71,10 +71,10 @@ ynh_add_systemd_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..."
|
||||
|
||||
ynh_add_config --template="../conf/db.example.inc.php" --destination="$install_dir/config/db.inc.php"
|
||||
ynh_add_config --template="../conf/.env" --destination="$install_dir/config/.env"
|
||||
|
||||
chmod 400 "$install_dir/config/db.inc.php"
|
||||
chown $app:$app "$install_dir/config/db.inc.php"
|
||||
chmod 400 "$install_dir/config/.env"
|
||||
chown $app:$app "$install_dir/config/.env"
|
||||
|
||||
#=================================================
|
||||
# BUILD MOVIM
|
||||
|
|
|
@ -79,14 +79,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..."
|
|||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
yunohost service add $app --description="Responsive web-based XMPP client"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
|
@ -94,10 +94,10 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..."
|
||||
|
||||
ynh_add_config --template="../conf/db.example.inc.php" --destination="$install_dir/config/db.inc.php"
|
||||
ynh_add_config --template="../conf/.env" --destination="$install_dir/config/.env"
|
||||
|
||||
chmod 400 "$install_dir/config/db.inc.php"
|
||||
chown $app:$app "$install_dir/config/db.inc.php"
|
||||
chmod 400 "$install_dir/config/.env"
|
||||
chown $app:$app "$install_dir/config/.env"
|
||||
|
||||
#=================================================
|
||||
# BUILD MOVIM
|
||||
|
@ -109,23 +109,6 @@ ynh_exec_warn_less ynh_composer_exec --phpversion="$phpversion" --workdir="$inst
|
|||
ynh_exec_warn_less ynh_composer_exec --phpversion="$phpversion" --workdir="$install_dir" --commands="update --no-interaction --quiet"
|
||||
ynh_exec_warn_less ynh_composer_exec --phpversion="$phpversion" --workdir="$install_dir" --commands="movim:migrate --quiet"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading systemd configuration..."
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
|
||||
yunohost service add $app --description="Responsive web-based XMPP client"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue