Skip to content

Instantly share code, notes, and snippets.

@wilson29thid

wilson29thid/bootstrap.early.php Secret

Last active Jan 6, 2020
Embed
What would you like to do?
<?php if (!defined('APPLICATION')) exit();
if (c('Garden.Installed')) { // I tried commenting this out
saveToConfig('Debug', getenv('DEBUG'), false);
saveToConfig('Garden.UpdateToken', getenv('UPDATE_TOKEN'), false);
saveToConfig('Garden.Title', 'Overwritten by bootstrap', false);
saveToConfig('Database.Host', getenv('DB_HOSTNAME'), false);
saveToConfig('Database.Name', getenv('DB_DATABASE'), false);
saveToConfig('Database.User', getenv('DB_USERNAME'), false);
saveToConfig('Database.Password', getenv('DB_PASSWORD'), false);
saveToConfig('Garden.Cookie.Salt', getenv('COOKIE_SALT'), false); // I tried using a string instead of getenv here
saveToConfig('Garden.Cookie.Domain', getenv('COOKIE_DOMAIN'), false);
// TODO: Replace these with getenv
saveToConfig('Garden.Email.SupportName', 'YOUR NAME', false);
saveToConfig('Garden.Email.SupportAddress', 'YOUR EMAIL ADDRESS', false);
saveToConfig('Garden.Email.UseSmtp', '1', false);
saveToConfig('Garden.Email.SmtpHost', 'smtp.gmail.com', false);
saveToConfig('Garden.Email.SmtpUser', 'YOUR EMAIL ADDRESS', false);
saveToConfig('Garden.Email.SmtpPassword', 'PASSWORD TOKEN', false); # Get this in Gmail etc.
saveToConfig('Garden.Email.SmtpPort', '465', false);
saveToConfig('Garden.Email.SmtpSecurity', 'ssl', false);
saveToConfig('Garden.Registration.CaptchaPrivateKey', 'YOUR KEY', false);
saveToConfig('Garden.Registration.CaptchaPublicKey', 'YOUR KEY', false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.