-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#20] include project config, Mailpit setup #22
Conversation
2685dc5
to
ac9a86d
Compare
ac9a86d
to
c7bc861
Compare
039dc26
to
81d715f
Compare
- SYSTEM_EMAIL_HOSTNAME=localhost | ||
- SYSTEM_EMAIL_PORT=1025 | ||
- SYSTEM_EMAIL_USERNAME=abc | ||
- SYSTEM_EMAIL_PASSWORD=123 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard coding these values into the DDEV config makes it harder to accidentally override these with production credentials.
# BEGIN-STARTER-ONLY | ||
config/license.key | ||
# END-STARTER-ONLY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is relatively simple to Regex replace everything within the tags
use craft\helpers\Console; | ||
use craft\helpers\StringHelper; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realized I could use these Craft helpers, which makes ScriptHelpers
super minimal (only need it for file text replacements).
fromEmail: $SYSTEM_EMAIL_FROM | ||
fromName: 'Viget Craft Starter' | ||
replyToEmail: null | ||
template: null | ||
transportSettings: | ||
host: $SYSTEM_EMAIL_HOSTNAME | ||
password: $SYSTEM_EMAIL_PASSWORD | ||
port: $SYSTEM_EMAIL_PORT | ||
useAuthentication: '1' | ||
username: $SYSTEM_EMAIL_USERNAME | ||
transportType: craft\mail\transportadapters\Smtp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumes we'll use some kind of SMTP service on our projects.
I've found it to be necessary to get password reset emails to work, even for small clients.
It's super affordable: https://aws.amazon.com/ses/pricing/
imager-x: | ||
edition: lite | ||
enabled: true | ||
licenseKey: REPLACE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We remove these licenseKey lines. They auto-regenerate with new numbers when you create a new project and visit the Craft admin for the first time.
35b563a0-4662-40b9-b885-a8450a2868d9: 'Viget Craft Starter' # Viget Craft Starter | ||
805d8826-faed-4186-9b88-f509eb9b07e6: 'Viget Craft Starter' # Viget Craft Starter | ||
b7e66782-af96-4012-9e17-914134073ced: Simple # Simple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels a little funny that these UUIDs will be repeated across projects... but it would be impossible for two Craft projects to be installed using the exact same DB tables, so it's not really an issue.
Overview
I think we could unlock some cool super-powers by committing baseline project config YAML in our starter.
ddev craft install
will also auto-install all of the plugins (instead of that being a separate step after installing Craft.What this PR does
craft install
composer-scripts/post-create-project.php
to replace any "starter" related text with the project specific text that the user is prompted with.Testing steps