Skip to content

svhawks/Sendy-Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Instaling docker

Install docker

Sendy service

Send newsletters, 100x cheaper

Building the container

Once you have setup the project run:

docker build -t sendy

Getting it running

To run apache in a background process, simply start the container using the following command:


docker run -p 8080:80 -d sendy

-p 8080:80 publishes port 80 in the container to 8080 on the host machine. -d detaches from the process, use docker ps and docker stop to … stop.

Note: on OSX use docker-machine ip default to get the right IP to use (assuming default is your machine name). Sometimes you’ll want to debug issues with the container; maybe there are PHP configuration issues or you want to view error logs. To do that you can start the container in interactive mode and then start apache manually:

docker run -i -t -p 8080:80 mysite /bin/bash
apachectl start

Making changes

If you’re actively developing you want to be able to change files in your usual editor and have them reflected within the container without having to rebuild it. The -v flag allows us to mount a directory from the host into the container:

docker run -p 8080:80 -d -v /Users/dan/site:/var/www/site sendy

Tutorial article on medium

Maintenance & Development ccali14