Skip to content

Docker-compose deployment for Sendy newsletter service

License

Notifications You must be signed in to change notification settings

marcinbiegun/docker-sendy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Docker-Sendy

Docker-compose config for running Sendy.

It contains:

  • PHP + MySQL + NGNiX stack,

and a few adjustments requried by Sendy:

  • URL rewrite rules as NGNiX config,
  • additional PHP extensions,
  • MySQL sql_mode without ONLY_FULL_GROUP_BY.

Installation

Prerequisites

  1. Sendy files and license number

  2. Server - create a t2.micro instance on AWS (free for 12 months since signup) or prepare other small machine (512MB of RAM is enough) with Ubuntu Server 16.04

  3. Domain address - set a DNS record pointing to your server's IP address

  4. SSL - prepare certificate files for your domain

Install Docker and Docker-Compose

  1. Install Docker and grant an user Docker access for your user (steps 1 & 2):

  2. Install Docker-Compose (step 1):

Install Sendy as a Docker container

  1. Clone my Docker-Compose configuration in the home directory: git clone https://github.com/marcinbiegun/docker-sendy.git

  2. Upload your SSL ceriticate files as ~/docker-sendy/docker/sendy.key and ~/docker-sendy/docker/sendy.pem

  3. Open ~/docker-sendy/docker/docker-compose.yml and set MySQL passwords at the end of the file

  4. In ~/docker-sendy/docker/server.conf change value of server_name to your domain name

  5. Copy Sendy files inside ~/docker-sendy/public_html

  6. Edit ~/docker-sendy/public_html/include/config.php:

    • set APP_PATH to your site URL
    • set $dbHost do mysql
    • set $dbUser to sendy
    • set $dbName to sendy
    • set $dbPass to the password you've set in docker-compose.yml
  7. Run chmod 777 ~/docker-sendy/public_html/uploads

  8. Inside ~/docker-sendy/docker directory, run docker-compose build to build the containers, then start the app with docker-compose start

  9. Setup cron. Find the PHP container's name by running docker-compose ps, it will be named like docker_php_1. Run crontab -e and add this line:

* * * * * docker exec docker_php_1 php /code/public_html/scheduled.php

Configure Sendy

At this point, Sendy should be up and running under your domain address. Open it, finish the setup inside Sendy installer (connect Amazon SAS account, etc.).

Done! You can send your first newsletter.

Kudos

Based on mortezaPRK/docker-php.

About

Docker-compose deployment for Sendy newsletter service

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published