9c4ea7a434 | ||
---|---|---|
.github/workflows | ||
deployment-example | ||
public | ||
src | ||
.gitignore | ||
CODE_OF_CONDUCT.md | ||
LICENSE | ||
README.md | ||
configuration.development.js | ||
package-lock.json | ||
package.json | ||
tsconfig.json |
README.md
Kill the Newsletter!
Convert email newsletters into Atom feeds
Watch the Code Review!
Deploy Your Own Instance (Self-Host)
-
Create accounts on GitHub, Namecheap, and DigitalOcean.
-
Fork this repository.
-
Create a deployment SSH key pair:
$ ssh-keygen
Private key (
id_rsa
): Add to your fork under Settings > Secrets as a new secret calledSSH_PRIVATE_KEY
.Public key (
id_rsa.pub
): Add to your fork under Settings > Deploy keys and to your DigitalOcean account under Account > Security > SSH keys. -
Buy a domain on Namecheap.
-
Create a DigitalOcean droplet:
Image Ubuntu 18.04.3 (LTS) x64 Plan Starter Standard $5/mo Additional options Monitoring Authentication Your Deployment SSH Key Hostname <YOUR DOMAIN, FOR EXAMPLE, “kill-the-newsletter.com”>
Backups Enable -
Assign the new droplet a Firewall:
Name <YOUR DOMAIN, FOR EXAMPLE, “kill-the-newsletter.com”>
Inbound Rules ICMP SSH 22 Custom 25 (SMTP) HTTP 80 HTTPS 443 -
Assign the new droplet a Floating IP.
-
Configure the DNS in Namecheap:
Type Host Value A
@
<FLOATING IP>
CNAME
www
<YOUR DOMAIN, FOR EXAMPLE, “kill-the-newsletter.com”>
MX
@
<YOUR DOMAIN, FOR EXAMPLE, “kill-the-newsletter.com”>
-
Configure the deployment on
package.json
, particularly under the following keys:apps.env.BASE_URL
.apps.env.EMAIL_DOMAIN
.apps.env.ISSUE_REPORT
.deploy.production.host
.deploy.production.repo
.
-
Setup the server:
$ ssh-add $ npm run deploy:setup
-
Migrate the existing feeds (if any):
$ ssh-add $ ssh -A root@<YOUR DOMAIN, FOR EXAMPLE, “kill-the-newsletter.com”> root@<YOUR DOMAIN, FOR EXAMPLE, “kill-the-newsletter.com”> $ rsync -av <path-to-previous-feeds> /root/kill-the-newsletter.com/current/static/feeds/ root@<YOUR DOMAIN, FOR EXAMPLE, “kill-the-newsletter.com”> $ rsync -av <path-to-previous-alternate> /root/kill-the-newsletter.com/current/static/alternate/
-
Push to your fork, which will trigger the GitHub Action that deploys the code and starts the server.
Run Locally
Install Node.js and run:
$ npm install
$ npm run develop
The web server will be running at http://localhost:8000
and the email server at smtp://localhost:2525
.
Run Tests
Install Node.js and run:
$ npm install-test
Docker Support (Experimental)
Install Docker and run:
$ docker build -t kill-the-newsletter .
$ docker run kill-the-newsletter
The web server will be running at http://localhost:8000
and the email server at smtp://localhost:2525
.
For use in production, start with the example Dockerfile
.