Skip to content

Commit

Permalink
Revert "Adding .env support (slawkens#1)"
Browse files Browse the repository at this point in the history
This reverts commit 79c570c.
  • Loading branch information
danilopucci committed Dec 21, 2023
1 parent 79c570c commit c9e99a2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 59 deletions.
10 changes: 0 additions & 10 deletions .env.example

This file was deleted.

2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,3 @@ landing

# others/rest
system/pages/downloads.php

.env
6 changes: 0 additions & 6 deletions .htaccess.dist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,3 @@
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php [L]
</IfModule>

# block files which needs to be hidden, specify .example extension of the file
<Files ~ "\.(env|json|config.js|md|gitignore|gitattributes|lock)$">
Order allow,deny
Deny from all
</Files>
27 changes: 0 additions & 27 deletions composer.json

This file was deleted.

24 changes: 10 additions & 14 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
* @link https://my-aac.org
*/

require_once __DIR__ . '/vendor/autoload.php';
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();

$config = array(
// directories & files
'server_path' => '', // path to the server directory (same directory where config file is located)
Expand Down Expand Up @@ -73,11 +69,11 @@
'cache_prefix' => 'myaac_', // have to be unique if running more MyAAC instances on the same server (except file system cache)

// database details (leave blank for auto detect from config.lua)
'database_host' => $_ENV['WEBSITE_DATABASE_HOST_IP'],
'database_port' => $_ENV['WEBSITE_DATABASE_HOST_PORT'], // leave blank to default 3306
'database_user' => $_ENV['WEBSITE_DATABASE_USER'],
'database_password' => $_ENV['WEBSITE_DATABASE_PASSWORD'],
'database_name' => $_ENV['WEBSITE_DATABASE_NAME'],
'database_host' => '',
'database_port' => '', // leave blank to default 3306
'database_user' => '',
'database_password' => '',
'database_name' => '',
'database_log' => false, // should database queries be logged and and saved into system/logs/database.log?
'database_socket' => '', // set if you want to connect to database through socket (example: /var/run/mysqld/mysqld.sock)
'database_persistent' => false, // use database permanent connection (like server), may speed up your site
Expand Down Expand Up @@ -127,12 +123,12 @@
'html' => ''/*'<br/>My Server,\n<a href="http://www.myserver.com">myserver.com</a>'*/
),
'smtp_enabled' => false, // send by smtp or mail function (set false if use mail function, set to true if you use GMail or Microsoft Outlook)
'smtp_host' => $_ENV['WEBSITE_EMAIL_SMTP'], // mail host. smtp.gmail.com for GMail / smtp-mail.outlook.com for Microsoft Outlook
'smtp_port' => $_ENV['WEBSITE_EMAIL_SMTP_PORT'], // 25 (default) / 465 (ssl, GMail) / 587 (tls, Microsoft Outlook)
'smtp_host' => '', // mail host. smtp.gmail.com for GMail / smtp-mail.outlook.com for Microsoft Outlook
'smtp_port' => 25, // 25 (default) / 465 (ssl, GMail) / 587 (tls, Microsoft Outlook)
'smtp_auth' => true, // need authorization?
'smtp_user' => $_ENV['WEBSITE_EMAIL'], // here your email username
'smtp_pass' => $_ENV['WEBSITE_EMAIL_PASSWORD'],
'smtp_secure' => 'ssl', // What kind of encryption to use on the SMTP connection. Options: '', 'ssl' (GMail) or 'tls' (Microsoft Outlook)
'smtp_user' => 'admin@example.org', // here your email username
'smtp_pass' => '',
'smtp_secure' => '', // What kind of encryption to use on the SMTP connection. Options: '', 'ssl' (GMail) or 'tls' (Microsoft Outlook)
'smtp_debug' => false, // set true to debug (you will see more info in error.log)

// reCAPTCHA (prevent spam bots)
Expand Down

0 comments on commit c9e99a2

Please sign in to comment.