Giter Club home page Giter Club logo

sendy's Introduction

Quick reference

This is the unofficial Sendy docker repository.

Check out Sendy, a self hosted newsletter app that lets you send emails 100x cheaper via Amazon SES.

Quick reference (cont.)

What is Sendy?

Sendy is a self-hosted email newsletter application that lets you send trackable emails via Amazon Simple Email Service (SES). This makes it possible for you to send authenticated bulk emails at an insanely low price without sacrificing deliverability.

For more information and related downloads for Sendy Server and other products, please visit Send.co.

Check out Sendy, a self hosted newsletter app that lets you send emails 100x cheaper via Amazon SES.

How to use this image

Starting a Sendy instance is simple.

$ docker run -d \
  --name sendy \
  -e SENDY_FQDN=campaigns.example.com \
  -e MYSQL_HOST=db_sendy \
  -e MYSQL_PASSWORD=db_password \
  bubbajames/sendy:tag

... where sendy is the name you want to assign to your container, campaigns.example.com is your FQDN of Sendy server, db_sendy is your database server instance, db_password is the database user's password and tag is the tag specifying the Sendy version you want. See the list of tags above.

Environment Varaibles

SENDY_PROTOCOL (Optional)

HTTP protocol used in Sendy APP_PATH (http or https). Default: http

SENDY_FQDN (required)

The fully qualified domain name of your Sendy installation. This must match the FQDN associated with your license. You can purchase a license here.

MYSQL_HOST (required)

The MySQL server hosting your Sendy database.

MYSQL_DATABASE (optional)

The Sendy database name. Default: sendy.

MYSQL_USER (optional)

Database user. Default: sendy.

MYSQL_PASSWORD (required)

Database user's password. Not recommended for sensitive data! (see: Docker Secrets)

SENDY_DB_PORT (optional)

Database port. Default: 3306.

Docker Secrets

As an alternative to passing sensitive information via environment variables, _FILE may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in /run/secrets/<secret_name> files. (See repository for sample secrets)

For example:

$ docker run -d --name sendy -e MYSQL_PASSWORD_FILE=/run/secrets/mysql-root -d sendy

Using Dockerfile

Pretty minimalistic Dockerfile as everything you need is already bundled. Just provide environment variables or environment file.

FROM bubbajames/sendy:5.2

# ... additional apache/php configurations here ... 
# e.g. copy your SSL Certificate and apache configurations if not using a load balancer.  

Start a Sendy instance

The following starts an instance specifying an environment file.

$ docker run -d -name sendy --env_file sendy.env -p 80:80 sendy

Sample environment file

SENDY_FQDN=campaigns.example.com
MYSQL_HOST=db_sendy
MYSQL_DATABASE=sendy
MYSQL_USER=sendy
MYSQL_PASSWORD_FILE=/run/secrets/db_password
# MYSQL_PASSWORD=db_password

Using docker-compose

Starts an HAProxy load balancer instance for SSL termination, a Sendy instance and a MySQL database instance with mounted volume for persisted data between restarts. Also uses Docker Secrets to avoid exposing sensitive data via 'inspect'.

The latest docker-compose.yml and sample files are available from the image repository. It is highly advised to clone this repository to ensure the latest samples are used.

version: "3.7"

# Volumes for persisted data.
volumes: 
  data_sendy:
    labels: 
      co.sendy.description: "Data volume for Sendy Database."

# Secret files so they're not exposed via 'docker inspect'
secrets:
  db_password:
    file: secrets/db_password
  db_root_password:
    file: secrets/db_root_password    

services:
  # Database: MySQL
  db_sendy:
    hostname: db_sendy
    container_name: db_sendy
    image: mysql:5.6
    env_file: 
      - sendy.env
    environment:
      MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
    secrets:
      - db_root_password
      - db_password      
    volumes: 
      - data_sendy:/var/lib/mysql

  # WebApp: Apache2+PHP+Sendy
  sendy:
    hostname: sendy
    container_name: sendy
    depends_on: 
      - db_sendy
    image: sendy:5.2
    build: 
      context: .
      # Uncomment to enabled XDEBUG build
      # target: debug
    env_file: 
      - sendy.env
    secrets:
      - db_password 
    ports:
      - 8080:80

  # Load Balancer: HAProxy
  load-balancer:
    hostname: lb_sendy
    container_name: lb_sendy
    image: lb_sendy
    build:
      context: .
      dockerfile: haproxy/Dockerfile   
    env_file: 
      - sendy.env      
    ports:
      - 80:80
      - 443:443

Start the services

$ docker-compose up -d

Stop the services

$ docker-compose down

Crontab Support

Crontab is installed and configured with the following jobs.

Scheduled Campaigns

Schedule your marketing campaigns to send at specific times in the future. This job executes every 5 minutes to determine if any campaigns should be started.

Autoresponders

Set up autoresponders to incoming emails. This job executes every 1 minute to determine if any emails require an autoresponse.

Import Lists

Import list of contacts in CSV files. This job executes every 1 minute to determine if any Import List jobs have been created and initiate CSV file import if needed.

Shoutouts

Brad Touesnard

Please read Brad Touesnard's article How to Create Your Own SSL Certificate Authority for Local HTTPS Development which inspired the generateSSLCerticate.sh script used in this project.

License

Please see license in repository

As with all Docker images, these likely also contain other software that may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

sendy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sendy's Issues

docker-compose not working , redirect to wrong domain

my docker-compose.yml

version: "3.7"

# Volumes for persisted data.
volumes:
  data_sendy:
    labels:
      co.sendy.description: "Data volume for Sendy Database."

# Secret files so they're not exposed via 'docker inspect'
secrets:
  db_password:
    file: secrets/db_password
  db_root_password:
    file: secrets/db_root_password

services:
  # Database: MySQL
  db_sendy:
    hostname: db_sendy
    container_name: db_sendy
    image: mysql:5.6
    env_file:
      - sendy.env
    environment:
      MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
    secrets:
      - db_root_password
      - db_password
    volumes:
      - data_sendy:/var/lib/mysql

  # WebApp: Apache2+PHP+Sendy
  sendy:
    hostname: sendy
    container_name: sendy
    depends_on:
      - db_sendy
    image: sendy:latest
    build:
      context: .
      # Uncomment to enabled XDEBUG build
      # target: debug
    env_file:
      - sendy.env
    secrets:
      - db_password
    ports:
      - 8080:80

  # Load Balancer: HAProxy
  load-balancer:
    hostname: lb_sendy
    container_name: lb_sendy
    image: lb_sendy
    build:
      context: .
      dockerfile: haproxy/Dockerfile
    env_file:
      - sendy.env
    ports:
      - 804:80
      - 4434:443

.env file

SENDY_PROTOCOL=https
# Update FQDN to match your Sendy licensed domain.
SENDY_FQDN=sendy.abc.com
MYSQL_HOST=db_sendy
MYSQL_DATABASE=sendy
MYSQL_USER=sendy
MYSQL_PASSWORD_FILE=/run/secrets/db_password
#MYSQL_PASSWORD=db_password

# XDEBUG
# REQUIRES BUILDING image with XDEBUG installed.
# See Dockerfile header for details.

# Uncomment to set XDEBUG enviorment configuration. Ensure `remote_port` does not have conflicts.
#XDEBUG_CONFIG=remote_host=host.docker.internal remote_port=9000 remote_enable=1 remote_autostart=1

when I try to open the url , it redirect to https://campaigns.example.com/_install.php
no matter what I configure in .env file
any suggestion to fix ?

Document uploads

In order for uploads to persist, you need to create a docker volume for them. This should be added to the readme and docker-compose.

mysql

Hi James,

For some reason mysql is not starting. I am getting following error when hit the sendy browser.

Can't connect to database
There is a problem connecting to the database. Please try again later or see this troubleshooting tip.

root@21e39f251a3a:/var/log/apt# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 21:46 ? 00:00:00 apache2 -DFOREGROUND
www-data 33 1 0 21:46 ? 00:00:00 apache2 -DFOREGROUND
www-data 34 1 0 21:46 ? 00:00:00 apache2 -DFOREGROUND
www-data 35 1 0 21:46 ? 00:00:00 apache2 -DFOREGROUND
www-data 36 1 0 21:46 ? 00:00:00 apache2 -DFOREGROUND
www-data 37 1 0 21:46 ? 00:00:00 apache2 -DFOREGROUND
www-data 38 1 0 21:46 ? 00:00:00 apache2 -DFOREGROUND
root 39 0 0 21:47 pts/0 00:00:00 /bin/bash
www-data 47 1 0 21:48 ? 00:00:00 apache2 -DFOREGROUND
root 66 39 0 22:11 pts/0 00:00:00 ps -ef
root@21e39f251a3a:/var/log/apt#

Option for memory limit

Add an option / env variable to set the memory_limit in the php.ini file.

Or how could I set this variable permenantly ?

Uncaught SyntaxError: "" string literal contains an unescaped line break _install.php

I could install version 5.2.0 fine.
All the requirements are met and it does create all the tables and fills in the login table with the initial user.

So back to the issue installing 5.2.3:
I get to this stage:

Great. Looks like your server is configured perfectly to run Sendy. :)

On the install page I see in the console:

Uncaught SyntaxError: "" string literal contains an unescaped line break _install.php:235:19

when I click the error link it shows me this highlighted line:

url = "https

which is in:

//Change the appearance
function change_appearance(mode)
{
	$("#dark_mode").val(mode);
	url = "https
://mydomain.com
/includes/helpers/appearance.php";
dark_mode = $("#dark_mode").val();

$.post(url, { dark_mode: dark_mode },
	function(data) {
	if(data)
		location.reload();
	else
		alert("Unable 

when I enter the details and click install the page refreshes and empties the fields.
now in the console shows:

Uncaught SyntaxError: "" string literal contains an unescaped line break _install.php:178:24

</div><script type="text/javascript">window.location = "https
://mydomain.com
/login";</script><hr>

Uncaught SyntaxError: "" string literal contains an unescaped line break _install.php:237:19

url = "https

(this error is the same as the first one, which shows the first time the install page is shown)

When I just go to mydomain.com it shows the sendy bar on the top with the settings button and profile button, but nothing in the main part of the screen. The console error says:

Uncaught SyntaxError: "" string literal contains an unescaped line break mydomain.com:121:24

 <div class="container-fluid">
	    <script type="text/javascript">window.location = "https
://mydomain.com
/login";</script>

Is the issue something to do with the config.php?:
define('APP_PATH', getenv('SENDY_PROTOCOL') . '://' . getenv('SENDY_FQDN'));

When I copy the error it shows the link like this with spaces:

https ://mydomain.com /login

Update to v5.0

Hi, can you please update sendy to the new version v5.0.

I can provide the v5.0 if you don't have the necessary new license key, just hit me up.

Documentation for ECS/Fargate

As it turns out, you can run Sendy in ECS, and even on Fargate. Using an EFS volume to persist uploads (see #9), Sendy will happily run on AWS. It might be nice to document a sample ECS task definition.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.