Convert email newsletters into Atom feeds
Go to file
Johan Holmerin 62dee956d7 Add support for alternate URL 2020-07-14 19:42:41 +02:00
.github/workflows . 2020-04-30 09:57:37 -04:00
.vscode . 2020-03-20 02:52:49 -04:00
static Add support for alternate URL 2020-07-14 19:42:41 +02:00
.gitignore Add support for alternate URL 2020-07-14 19:42:41 +02:00
CODE_OF_CONDUCT.md . 2020-03-17 21:05:16 -04:00
Caddyfile . 2020-03-31 12:57:56 -04:00
LICENSE . 2020-03-17 21:05:16 -04:00
README.md Add link to Caddyfile in README 2020-07-09 12:36:48 +01:00
index.ts Add support for alternate URL 2020-07-14 19:42:41 +02:00
package-lock.json Update caddy 2020-07-09 15:14:32 +01:00
package.json Remove pre-deploy-local that was only necessary for rsync 2020-07-09 15:22:04 +01:00
test.ts . 2020-07-09 12:35:02 +01:00
tsconfig.json . 2020-06-09 09:26:41 +01:00

README.md

Kill the Newsletter!

Convert email newsletters into Atom feeds

Convert email newsletters into Atom feeds

Source Continuous Integration

Deploy Your Own Instance (Self-Host)

  1. Create accounts on GitHub, Namecheap, and DigitalOcean.

  2. Fork this repository.

  3. Create a deployment SSH key pair:

    $ ssh-keygen
    

    Private key (id_rsa): Add to your fork under Settings > Secrets as a new secret called SSH_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.

  4. Buy a domain on Namecheap.

  5. 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
  6. 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
  7. Assign the new droplet a Floating IP.

  8. 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”>
  9. 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.
  10. Configure Caddy, the reverse proxy, on Caddyfile.

  11. Setup the server:

    $ ssh-add
    $ npx pm2 deploy package.json production setup
    
  12. 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/www.kill-the-newsletter.com/current/static/feeds/
    
  13. 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 start

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