Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is the "Auto deploy your site on your server" article? :-) #68

Open
louisremi opened this issue Jan 4, 2017 · 7 comments
Open

Comments

@louisremi
Copy link
Contributor

Hi @karellm,

I've been playing with this project for two days and discovered that the article/docs on how to get a project in production doesn't exist yet. Is there a draft somewhere? I'm quite new to Docker and don't quite know where to start.
Any help would be greatly appreciated.

Best regards,
Louis-Rémi

@karellm
Copy link
Collaborator

karellm commented Jan 5, 2017

Hi @louisremi, I'm sorry but I don't currently have the time to write on the subject. This project is mostly intended for development and deploying it is not necessarily a good idea. @dsifford Has actually more experience deploying Wordpress via Docker than I do.

@dsifford
Copy link
Collaborator

dsifford commented Jan 5, 2017

@karellm is correct. As of right this moment, there is not really a good way to deploy a wordpress site using compose because you lose the benefit of containerization and separation of concerns (all your services land in a single instance).

Having said that, this is all going to change extremely soon. When compose v1.10.0 lands, there will be a way to deploy to a swarm cluster using (I believe) docker stack deploy. That will change everything.

I plan on deploying all the WordPress sites that I have using that strategy once that happens.

@dsifford
Copy link
Collaborator

Working on deploying two sites using this orchestration now.

Scratch what I said about compose v1.10.0 solving all the issues. It doesn't. docker stack deploy builds each image into a .dab file and strips all the volumes. So that won't work.

Having said that, if you're okay with deploying to a single cloud provider and having all your services managed virtually in a single cloud box, I can help point you in the direction you'd have to go.

@louisremi
Copy link
Contributor Author

Yes, that's what I intended to do. I saw there were some tutorials about "using docker-compose in production" out there. But any help would be appreciated.

@cbravo
Copy link

cbravo commented Jun 16, 2017

@karellm @dsifford @louisremi I am also looking to deploy this project to production and need any kind of advice you might be able to give me... anything to point me in the right direction. I have it working wonderfully on my local machine (thank you for a great project) but I do not know what the next steps are to deploy this to my staging and prod servers....One of the things I am unsure about is how are my theme files included into production? where do they live since on development they are already on the host machine and being mounted as a volume?

@dsifford
Copy link
Collaborator

dsifford commented Jun 16, 2017

@cbravo I'm currently running this in production for a couple sites.

Two up front provisos to know about before getting started:

  1. There is currently no php mailserver included in this orchestration. So you won't be able to send mail using wp_mail or PHP's mail functions. Currently the workaround is to use a transactional email service (we use sendgrid, which provides a one-click install plugin to mitigate this).
  2. There currently isn't very robust DDoS protection. One of my sites got hammered hard with a DDoS attack recently and I had to add in some safeguards after the fact. Those safeguards haven't made it into the Dockerfile yet.

A full answer to this will require a lot more typing or a screencast or something, which I unfortunately don't have the time for right now. In the meantime, I'll try to answer your direct questions.

"but I do not know what the next steps are to deploy this to my staging and prod servers"

I've found that this project pairs nicely with docker-machine and any of their cloud providers (we use Digital Ocean).

Step 1 is to provision a machine on a cloud host using a small-to-medium sized machine. We are using Ubuntu 16.04 on DigitalOceans $20/month droplet size (2GB memory, 40GB storage, 3TB transfer).

"One of the things I am unsure about is how are my theme files included into production? where do they live since on development they are already on the host machine and being mounted as a volume?"

After getting your cloud host set up, you'll then need to transfer your theme files, the docker-compose file, and any other volumed files to the machine using scp.

Assuming you have a Docker machine named my-machine, that involves just running the following command

$ docker-machine scp -r -d /path/to/dir/or/file/on/localmachine my-machine:/path/to/dir/or/file/on/remote

Then, once your files are there, just run docker-compose as you normally would. (See the readme for details on how to obtain SSL certificates, and what changes you need to make to your compose file for production).

Hope that helps.

@dikaso
Copy link

dikaso commented Mar 1, 2020

What about https://buddy.works/wordpress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants