Merge pull request #17 from nitrous-io/master
Nitrous.io Quickstart button
This commit is contained in:
commit
3c2372c3ba
4 changed files with 48 additions and 0 deletions
10
README.md
10
README.md
|
@ -62,6 +62,16 @@ Edit [mailtrain.nginx](setup/mailtrain.nginx) (update `server_name` directive) a
|
|||
|
||||
Edit [mailtrain.conf](setup/mailtrain.conf) (update application folder) and copy it to `/etc/init`
|
||||
|
||||
## Nitrous Quickstart
|
||||
|
||||
You can quickly create a free development environment for this Mailtrain project in the cloud on www.nitrous.io:
|
||||
|
||||
<a href="https://www.nitrous.io/quickstart">
|
||||
<img src="https://nitrous-image-icons.s3.amazonaws.com/quickstart.png" alt="Nitrous Quickstart" width=142 height=34>
|
||||
</a>
|
||||
|
||||
In the IDE, start Mailtrain via `Run > Start Mailtrain` and access your site via `Preview > 3000`.
|
||||
|
||||
## Bounce handling
|
||||
|
||||
Mailtrain uses webhooks integration to detect bounces and spam complaints. Currently supported webhooks are:
|
||||
|
|
13
README.nitrous.md
Normal file
13
README.nitrous.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Setup
|
||||
|
||||
Welcome to your Mailtrain project on Nitrous.
|
||||
|
||||
## Running the development server:
|
||||
|
||||
In the [Nitrous IDE](https://community.nitrous.io/docs/ide-overview), start Mailtrain via "Run > Start Mailtrain".
|
||||
|
||||
Now you've got a development server running and can see the output in the Nitrous terminal window. You can open up a new shell or utilize [tmux](https://community.nitrous.io/docs/tmux) to open new shells to run other commands.
|
||||
|
||||
## Preview the app
|
||||
|
||||
In the Nitrous IDE, open the "Preview" menu and click "Port 3000".
|
16
nitrous-post-create.sh
Executable file
16
nitrous-post-create.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
sudo apt-get update
|
||||
sudo -E apt-get -q -y install mysql-server
|
||||
sudo apt-get clean
|
||||
|
||||
mysql -u root -e "CREATE USER 'mailtrain'@'localhost' IDENTIFIED BY 'mailtrain';"
|
||||
mysql -u root -e "GRANT ALL PRIVILEGES ON mailtrain.* TO 'mailtrain'@'%' WITH GRANT OPTION;"
|
||||
mysql -u mailtrain --password="mailtrain" -e "CREATE database mailtrain;"
|
||||
mysql -u mailtrain --password="mailtrain" -D mailtrain < setup/mailtrain.sql
|
||||
|
||||
cp config/default.toml config/production.toml
|
||||
echo "running npm install..."
|
||||
npm install --no-progress
|
||||
echo "npm install done"
|
9
nitrous.json
Normal file
9
nitrous.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"template": "nodejs",
|
||||
"ports": [3000],
|
||||
"name": "Mailtrain",
|
||||
"description": "Self hosted newsletter app.",
|
||||
"scripts": {
|
||||
"Start Mailtrain": "cd ~/code/mailtrain && NODE_ENV=production npm start"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue