├── .gitignore
├── README.md
├── docs
├── .index.md.swo
├── .index.md.swp
├── Docker-WordPress-Control-Panel.md
├── docker
│ ├── Install-Docker-on-Ubuntu.md
│ ├── Upgrading-Containers.md
│ ├── What-is-Docker.md
│ └── Why-use-Docker-with-WordPress.md
├── imgs
│ ├── devoply.jpg
│ └── devoply.png
├── index.md
├── links.md
└── mailgun-ssmtp.md
├── geo.php
├── getlogs.sh
├── google65b1080930b21cbb.html
├── mkdocs.yml
├── policy.json
├── readthedocs
├── __init__.py
├── __pycache__
│ └── __init__.cpython-35.pyc
├── base.html
├── breadcrumbs.html
├── css
│ ├── highlight.css
│ ├── theme.css
│ └── theme_extra.css
├── fonts
│ ├── fontawesome-webfont.eot
│ ├── fontawesome-webfont.svg
│ ├── fontawesome-webfont.ttf
│ └── fontawesome-webfont.woff
├── footer.html
├── img
│ └── favicon.ico
├── js
│ ├── highlight.pack.js
│ ├── jquery-2.1.1.min.js
│ ├── modernizr-2.8.3.min.js
│ └── theme.js
├── main.html
├── search.html
├── searchbox.html
├── toc.html
└── versions.html
├── robots.txt
├── rsync.sh
├── runstatic.sh
├── s3sync.sh
└── uniq.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | site*
2 | logs*
3 | sitelog.txt
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # wordpressdocker
2 |
--------------------------------------------------------------------------------
/docs/.index.md.swo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/etopian/wordpressdocker/a551ca3dcd86d9935f29e5ea3a882fc280af4bbb/docs/.index.md.swo
--------------------------------------------------------------------------------
/docs/.index.md.swp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/etopian/wordpressdocker/a551ca3dcd86d9935f29e5ea3a882fc280af4bbb/docs/.index.md.swp
--------------------------------------------------------------------------------
/docs/Docker-WordPress-Control-Panel.md:
--------------------------------------------------------------------------------
1 | # Docker WordPress Control Panel
2 |
3 | [](https://www.devoply.com/)
4 |
5 | DEVOPly is a hosting control panel which does everything taught in this tutorial automatically and much more, backups, staging/dev/prod, code editor, Github/Bitbucket deployments, DNS, WordPress Management. [https://www.devoply.com](https://www.devoply.com)!
6 |
7 |
--------------------------------------------------------------------------------
/docs/docker/Install-Docker-on-Ubuntu.md:
--------------------------------------------------------------------------------
1 | # Install Docker on Ubuntu 18.04 LTS
2 |
3 | Install Docker on Ubuntu 18.04 LTS. Below is a bash script containing a number of commands which will automatically install Docker on your VPS or dedicated server.
4 |
5 |
6 | ```bash
7 | #!/bin/bash
8 |
9 | apt-get update
10 | apt-get install -y apt-transport-https ca-certificates
11 | apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
12 | echo 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' > /etc/apt/sources.list.d/docker.list
13 | apt-get update
14 | #apt-cache policy docker-engine
15 |
16 | #apt-get update
17 | apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
18 | #apt-get update
19 | apt-get install -y docker-engine
20 | service docker start
21 | ```
22 |
23 | Now Docker is installed on your Ubuntu box... Time to install WordPress
24 |
--------------------------------------------------------------------------------
/docs/docker/Upgrading-Containers.md:
--------------------------------------------------------------------------------
1 | # Upgrading WordPress Docker Containers
2 |
3 | One of the key benefits of using Docker is the fact that it makes deployment of software eaiser. It packs everything you need into an container and ships that entire container with the entire enviornment. This makes deploying more predictable than the old method of just pushing the files and then keeping the operating system up to date in hopes that everything keeps working.
4 |
5 |
6 | ## The Old Way
7 | Site upgrades currently are difficult. If, for instance, you are using Ubuntu you can upgrade a website quickly using something like the following:
8 |
9 | ```code
10 | apt-get update && apt-get upgrade
11 | ```
12 |
13 | If you do this, what guarantees do you have that your site will actually come up after the upgrade is done? None! An upgrade may very well kill your site and there is no way to revert the site if this happens.
14 |
15 | With Docker things are different. If you need to upgrade your site, you do not upgrade the entire operating system. You deploy a new container running a single site, your site, while keeping the existing container so you can revert if the upgrade fails.
16 |
17 | # The Docker Way
18 |
19 | Say that you deploy a new WP site with Docker (a contrived example):
20 | ```code
21 | docker run -d --name=mysite_com -v /data/mysite_com:/var/sites/mysite_com wordpress
22 | ```
23 |
24 | A few months later a new container is released for WordPress. This new container includes a new version of PHP.
25 |
26 | ```code
27 | docker pull wordpress
28 | ```
29 |
30 | Now you can rename your existing container:
31 |
32 | ```code
33 | docker rename mysite_com mysite_com_old
34 | ```
35 |
36 | Stop the old container:
37 |
38 | ```code
39 | docker stop mysite_com_old
40 | ```
41 |
42 | Start a new container, with the new image that you pulled:
43 | ```code
44 | docker run -d --name=mysite_com -v /data/mysite_com:/var/sites/mysite_com wordpress
45 | ```
46 |
47 | If the new container is not working, stop the new site:
48 | ```code
49 | docker stop mysite_com
50 | ```
51 |
52 | Rename it to _notworking:
53 | ```code
54 | docker rename mysite_com mysite_com_notworking
55 | ```
56 |
57 | Rename the old container back:
58 | ```code
59 | docker rename mysite_com_old mysite_com
60 | ```
61 |
62 | Restart the old container:
63 | ```code
64 | docker start mysite_com
65 | ```
66 |
67 | Remove the nonworking container:
68 | ```code
69 | docker rm mysite_com_notworking
70 | ```
--------------------------------------------------------------------------------
/docs/docker/What-is-Docker.md:
--------------------------------------------------------------------------------
1 | # What is Docker?
2 |
3 | Docker is containerizing technology that allows easy packaging of apps into containers. This solves the problem of deployment. With Docker you can type a single command into your console and your application can be downloaded and installed. What's more, your application be downloaded and installed in an independent copy of the operating system with an independent file system. This environment will still run off of the main Linux kernel which is more efficient than running a virtual private server, a VPS, for each site.
4 |
5 | Docker prefers that you deploy one service per container, however this is not a hard requirement. You may deploy more than one service per container if it makes sense for the specific use case. In this sense it can be used similarly to a VPS. It allows you to isolate one or more processes in a self contained environment. The Docker way of doing things is different from the way that we did things and it is in many ways better.
6 |
--------------------------------------------------------------------------------
/docs/docker/Why-use-Docker-with-WordPress.md:
--------------------------------------------------------------------------------
1 | # Why Use Docker with WordPress?
2 |
3 | ## Security
4 |
5 | ### Malware
6 |
7 | WordPress sites are often hacked. Often the issue is not core WP but instead an insecure plugin, like for instance recently it was Gravity forms. Once a site is hacked, it then has to be cleaned up. Malware can infect all files on all sites owned by the same Unix user. Companies like Sucuri or Sitelock focus on monitoring for such hacks and provide remediation services to clean up the site once the site is hacked. They encourage users to keep their sites updated, but often this is not enough as the vunerability is discovered after it has been used to exploit many sites. Docker helps by isolating each site in its container, keeping the malware confined to a single exploited site. There are other methods of doing this, like Chroot, but Docker makes this trivial.
8 |
9 | ### Data theft
10 |
11 | Once a site is exploited, all data on the site is available for the attacker to download. If multiple sites are running on the same server with the same user, say www-data, or the same group with the wrong file permissions. Then all data for all sites can be accessed by the attacker. This allows the attacker to steal hashed passwords, private information, usernames or anything else that might be of value and is accessible by the user. That can then later be used to attack other sites and deface them, steal e-mails, and so on.
12 |
13 |
14 | ### Loss of search engine ranking
15 |
16 | Exploited sites may produce different content which could cause your listing to lose rank. They may also host malware which is served to desktop computers. If a site is compromised, then it's very likely that Google will detect this and unlist your site until you remedy the problem. That means loss of traffic and therefore loss of business for your site.
17 |
18 | ## Performance
19 |
20 | Load Impact profiled Docker against bare metal, meaning servers without any virtualization, and found near bare metal performance using Docker. They generally found performance of Docker vs. Bare Metal was very similar. You pay a small penalty for using Docker rather than bare metal, but the benefits of added security and isolation more than makes up for this short coming.
21 |
22 | - https://k6.io/blog/wordpress-bare-metal-vs-wordpress-docker-performance-comparison
23 |
24 |
25 | ## Maintenance and Upgrading Containers
26 | See [Maintenance and Upgrading](/docker/Upgrading-Containers)
27 |
--------------------------------------------------------------------------------
/docs/imgs/devoply.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/etopian/wordpressdocker/a551ca3dcd86d9935f29e5ea3a882fc280af4bbb/docs/imgs/devoply.jpg
--------------------------------------------------------------------------------
/docs/imgs/devoply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/etopian/wordpressdocker/a551ca3dcd86d9935f29e5ea3a882fc280af4bbb/docs/imgs/devoply.png
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # WordPress on Docker in Production - Unofficial Quickstart Tutorial / Guide
2 |
3 | ## Introduction
4 |
5 | Docker is a great technology which can be used for many purposes. One purpose for using Docker is to deploy WordPress. This tutorial covers deploying **multiple WordPress websites** on Docker. For this demo we are deploying etopian.com, replace that with your custom domain.
6 |
7 | ## Our custom Docker image
8 | The following is a quick tutorial for deploying your site on Docker. It has been tested and works with sites like www.etopian.com. It also supports using an SSL certificate. It uses Alpine Linux for serving the actual site, the beautiful thing is that a site can be served in around 50mb of ram. Using the process below you can deploy multiple WP sites on the same box, at least 10 sites on a 1gb VPS extremely securely as each site lives in its own container. This container uses Alpine Linux Edge with PHP7. We have found this to be a stable solution, despite being Edge being the testing branch of Alpine Linux. Our image on [github](https://github.com/etopian/alpine-php-wordpress).
9 |
10 |
11 | ###Security
12 | The process serving the website, Nginx and PHP-FPM, does not run as root. It's no less secure than running a non-root user like www-data to serve your site. If you can breakout to root within the container, you can potentially get to the host system. But that's absolutely no different than any other Linux system. If you break out of www-data on a normal setup to root, then you have root. See [Why use Docker with WordPress](docker/Why-use-Docker-with-WordPress) for more.
13 |
14 | ## Design decisions
15 | We do not use Docker's volume feature. Instead all files including the MariaDB data directory are bind mounted directly from the host. All your files are on the host in the /data directory. This helps with backups and is generally a safe way of dealing with files while dealing with Docker. Let's for instance assume that Docker fails to start and you need to rescue your sites. This way all your files including your database are in /data. If you would use Docker's volumes feature then you would not have any access to any of the sites files. All the NGINX config directories are mounted to /etc/nginx on the host for easy editing and management.
16 |
17 | Each WordPress Container contains:
18 |
19 | * Nginx
20 | * PHP-FPM
21 | * WP-CLI
22 | * git
23 | * Rsync
24 | * Vim
25 | * Bash
26 |
27 | File upload size limit is 2GB
28 |
29 | Currently there is no process manager running in the WordPress container, not that this affects things much. We have it on our todo list to use s6 as the process manager. The nginx user is enabled on each container so you can bash into the container as the same user as the site, to use wp-cli. This is a minor security risk. Currrently there is no way to directly SSH into the container, you have to go through the host. There are no plans to add SSH to the container, you have to that yourself if that's something you need.
30 |
31 | ## Install Docker
32 |
33 | First [install Docker](docker/Install-Docker-on-Ubuntu/). We are using Docker 1.12.3. We are running Ubuntu Xenial 16.04 LTS
34 |
35 | ##Prepare your WordPress site
36 |
37 | Site files need to be located in /data/sites/etopian.com/htdocs, simply copy the files here:
38 |
39 | ```
40 | mkdir -p /data/sites/etopian.com/htdocs
41 | #Copy your WP install here, if you don't have one simply download WP and put that here
42 | /data/sites/etopian.com/htdocs
43 | ```
44 |
45 | ### File ownership
46 | The site on your host needs proper file permissions. Go to your site's folder and type the following:
47 |
48 | ```
49 | chown -R 100:101 htdocs/
50 | ```
51 |
52 | If you are using this image for development on a Linux box, then you will want to edit these files as a different user. You can do that using the following command:
53 |
54 | ```
55 | setfacl -Rm u::rwX,g::rwX,d:g::rwX /data/sites/.com
56 | ```
57 | Replace the tokens with their appropriate replacements.
58 |
59 |
60 | ## Run NGINX Reverse Proxy Container
61 | This sits in front of all of your sites at port 80 and 443 serving all your sites. It was automatically reconfigure itself and reload itself when you create a new WordPress site container.
62 |
63 | ```
64 | docker run -d --name nginx -p 80:80 -p 443:443 -v /etc/nginx/htpasswd:/etc/nginx/htpasswd -v /etc/nginx/vhost.d:/etc/nginx/vhost.d:ro -v /etc/nginx/certs:/etc/nginx/certs -v /var/run/docker.sock:/tmp/docker.sock:ro etopian/nginx-proxy
65 | ```
66 |
67 | ## Run WordPress Container
68 | Each site runs in its own container with PHP-FPM and Nginx instance.
69 | ```
70 | docker run -d --name etopian_com -e VIRTUAL_HOST=www.etopian.com,etopian.com -v /data/sites/etopian.com:/DATA etopian/alpine-php-wordpress
71 | ```
72 |
73 |
74 | If you use SSL you need to run your container with the filename of the certificate you are using.
75 | ```
76 | -e CERT_NAME=etopian.com
77 | ```
78 |
79 | Put your SSL certificate here, with the VIRTUAL_HOST as the file name:
80 | ```
81 | /etc/nginx/certs
82 | etopian.com.crt etopian.com.csr etopian.com.key
83 | ```
84 |
85 | Also check the wp-config section for information on how to modify your wp-config file if you are using SSL/TLS.
86 |
87 | ##Run MySQL/MariaDB Database Container
88 |
89 | In order to access MySQL/MariaDB running in a container you need a MySQL client on your host. You can alternatively using the client in the container, described below.
90 |
91 | ### Install MariaDB
92 | ```
93 | docker run -d --name mariadb -p 172.17.0.1:3306:3306 -e MYSQL_ROOT_PASSWORD=myROOTPASSOWRD -v /data/mysql:/var/lib/mysql mariadb
94 | ```
95 |
96 | ### Use MySQL from the host
97 |
98 | ```bash
99 | apt-get update && apt-get install mariadb-client-10.0
100 |
101 | #login to mariadb
102 | mysql -uroot -pmyROOTPASSOWRD -h 172.17.0.1 -P 3306
103 |
104 | #create the db in mariadb
105 | CREATE DATABASE etopian_com;
106 | CREATE USER 'etopian_com'@'%' IDENTIFIED BY 'mydbpass';
107 | GRANT ALL PRIVILEGES ON etopian_com.* TO 'etopian_com'@'%';
108 |
109 | #if you have a db, import it. if not then configure wp and install it using the interface.
110 | mysql -uroot -pmyROOTPASSOWRD -h 172.17.0.1 etopian_com < mydatabase.mysql
111 | ```
112 |
113 | ### Use MySQL client in the container image
114 |
115 | ```bash
116 | docker cp mydatabase.sql mariadb:/tmp/mydatabase.mysql
117 | docker exec -it mariadb bash
118 | export TERM=xterm
119 | cd /tmp
120 | mysql -uroot -pmyROOTPASSOWRD < mydatabase.mysql
121 |
122 | ```
123 |
124 | ## Configure WordPress
125 |
126 |
127 | ###wp-config.php
128 | If you need to change the domain of the site put the follow in wp-config.php of your site.
129 |
130 | ```php
131 | /** The name of the database for WordPress **/
132 | define('DB_NAME', 'etopian_com");
133 |
134 | /** MySQL database username **/
135 | define('DB_USER', 'etopian_com');
136 |
137 | /** MySQL database password **/
138 | define('DB_PASSWORD', 'mydbpass');
139 |
140 | /** MySQL hostname **/
141 | define('DB_HOST', '172.17.0.1');
142 | ```
143 |
144 | Your site should be working as long as the DNS entries are properly set.
145 |
146 |
147 | ### wp-config.php - SSL
148 | Put your SSL certificate here, with the VIRTUAL_HOST as the file name:
149 | ```
150 | /etc/nginx/certs
151 | etopian.com.crt etopian.com.csr etopian.com.key
152 | ```
153 |
154 | If you use SSL you need to run your container with the filename of the certificate you are using. So rm the existing container and recreate a new one with the following environmental variable.
155 | ```
156 | -e CERT_NAME=etopian.com
157 | ```
158 |
159 | edit wp-config.php in your site's htdocs directory.
160 |
161 | ```
162 | define('WP_HOME','https://etopian.com');
163 | define('WP_SITEURL','https://etopian.com');
164 | define('FORCE_SSL_ADMIN', true);
165 | if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
166 | $_SERVER['HTTPS']='on';
167 | ```
168 |
169 | ###wp-config.php
170 | If you need to change the domain of the site put the follow in wp-config.php of your site.
171 |
172 | ```
173 | define('WP_HOME','http://etopian.com');
174 | define('WP_SITEURL','http://etopian.com');
175 | ```
176 |
177 |
178 | ##Mail
179 | Mail is not routed by the container, you must use an SMTP plugin or Mailgun or AWS SES to route your site's email.
180 |
181 | The reason that mail is not routed is because configuring mail to route from the proper domain on a server is often a headache. A further headache is actualty getting mail delivered from an arbitrary IP. A third issue is that mail servers consume resources. A fourth issue is security. So for all these reasons we decided not to implement mail and instead delegate that task to various providers like Mailgun.
182 |
183 | Mailgun WP Plugin works fine in the container but the test to see if it is working will fail because it does not correctly set the e-mail address before attempting to send an e-mail. Simply ignore the error, and test the mail from your actual site to make sure it's working.
184 |
185 | * [https://wordpress.org/plugins/mailgun/](https://wordpress.org/plugins/mailgun/) (recommended)
186 | * https://wordpress.org/plugins/wp-ses/
187 | * https://wordpress.org/plugins/wp-smtp/
188 | * https://wordpress.org/plugins/easy-wp-smtp/
189 | * https://wordpress.org/plugins/wp-mail-bank/
190 |
191 | ##Logs
192 | You can view the logs of all your sites using the NGINX proxy container.
193 |
194 | ```
195 | docker logs nginx
196 | ```
197 |
198 | If you want to view logs for an individual site, they are in the logs directory on your host.
199 |
200 | ```
201 | cd /data/sites/etopian.com/logs
202 | cat access.log
203 | ```
204 |
205 | ##WP-CLI
206 |
207 | WP-CLI is included in the Alpine Linux image. To use it from inside the container in a safe way.
208 |
209 | ```
210 | docker exec -it bash
211 | su nginx
212 | cd /DATA
213 | wp-cli
214 | ```
215 |
216 | ## Redis
217 | It is possible to speed up your site with Redis... You need enough memory to support Redis obviously.
218 |
219 | You need the following WP plugin:
220 | https://wordpress.org/plugins/redis-cache/
221 |
222 | Put this in your wp-config.php below the DB_HOST and DB_NAME entries.
223 | ```
224 | define('WP_REDIS_HOST', DB_HOST);
225 | define('WP_CACHE_KEY_SALT', DB_NAME);
226 | ```
227 |
228 | Deploy Redis
229 | ```
230 | docker run --name redis -p 172.17.0.1:6379:6379 redis
231 | ```
232 |
233 | Go to your site's dashboard and activate the Redis object cache.
234 |
235 | Settings > Redis and click the button to activate.
236 |
237 |
238 | ## Modifying the image
239 |
240 | The image for Alpine Linux running PHP may be found here:
241 | [https://github.com/etopian/alpine-php-wordpress](https://github.com/etopian/alpine-php-wordpress)
242 |
243 | You may fork it and modify it to add additional modules and what not.
244 |
245 | ## Adding new PHP modules
246 |
247 | > The following modules are included with the image etopian/alpine-php-wordpress
248 |
249 | ```
250 | php7-fpm php7-json php7-zlib php7-xml php7-pdo php7-phar php7-openssl \
251 | php7-pdo_mysql php7-mysqli php7-session \
252 | php7-gd php7-iconv php7-mcrypt \
253 | php7-curl php7-opcache php7-ctype php7-apcu \
254 | php7-intl php7-bcmath php7-dom php7-xmlreader
255 | ```
256 |
257 |
258 | ## List of PHP Modules
259 |
260 | > List of available modules in Alpine Linux, not all these are installed.
261 |
262 | > In order to install a php module do, (leave out the version number i.e. -5.7.0.13-r0
263 |
264 |
265 | ```
266 | docker exec apk add
267 | docker restart
268 |
269 | ```
270 |
271 | Example:
272 |
273 | ```
274 | docker exec apk update #do this once.
275 | docker exec apk add php-soap
276 | docker restart
277 | ```
278 |
279 |
280 | ```
281 | php7-intl
282 | php7-openssl
283 | php7-dba
284 | php7-sqlite3
285 | php7-pear
286 | php7-phpdbg
287 | php7-litespeed
288 | php7-gmp
289 | php7-pdo_mysql
290 | php7-pcntl
291 | php7-common
292 | php7-oauth
293 | php7-xsl
294 | php7-fpm
295 | php7-gmagick
296 | php7-mysqlnd
297 | php7-enchant
298 | php7-solr
299 | php7-uuid
300 | php7-pspell
301 | php7-ast
302 | php7-redis
303 | php7-snmp
304 | php7-doc
305 | php7-mbstring
306 | php7-lzf
307 | php7-timezonedb
308 | php7-dev
309 | php7-xmlrpc
310 | php7-rdkafka
311 | php7-stats
312 | php7-embed
313 | php7-xmlreader
314 | php7-pdo_sqlite
315 | php7-exif
316 | php7-msgpack
317 | php7-opcache
318 | php7-ldap
319 | php7-posix
320 | php7-session
321 | php7-gd
322 | php7-gettext
323 | php7-mailparse
324 | php7-json
325 | php7-xml
326 | php7-mongodb
327 | php7
328 | php7-iconv
329 | php7-sysvshm
330 | php7-curl
331 | php7-shmop
332 | php7-odbc
333 | php7-phar
334 | php7-pdo_pgsql
335 | php7-imap
336 | php7-pdo_dblib
337 | php7-pgsql
338 | php7-pdo_odbc
339 | php7-xdebug
340 | php7-zip
341 | php7-apache2
342 | php7-cgi
343 | php7-ctype
344 | php7-inotify
345 | php7-couchbase
346 | php7-amqp
347 | php7-mcrypt
348 | php7-readline
349 | php7-wddx
350 | php7-cassandra
351 | php7-libsodium
352 | php7-bcmath
353 | php7-calendar
354 | php7-tidy
355 | php7-dom
356 | php7-sockets
357 | php7-zmq
358 | php7-memcached
359 | php7-soap
360 | php7-apcu
361 | php7-sysvmsg
362 | php7-zlib
363 | php7-ssh2
364 | php7-ftp
365 | php7-sysvsem
366 | php7-pdo
367 | php7-bz2
368 | php7-mysqli
369 | ```
370 | # Docker WordPress Control Panel
371 |
372 | [](https://www.devoply.com/)
373 |
374 | DEVOPly is a hosting control panel which does everything taught in this tutorial automatically and much more, backups, staging/dev/prod, code editor, Github/Bitbucket deployments, DNS, WordPress Management. [https://www.devoply.com](https://www.devoply.com)!
375 |
376 |
377 |
378 |
379 | ## Firewall
380 |
381 | You should also deploy a firewall on your box. However, it's very easy to lock yourself out of your box, so I will not give you exact instructions on how to do it. The following is what I use for my box using arno-iptables-firewall.
382 |
383 | Once the firewall is in place, notice when the box reboots, Docker might not start in the right order and therefore the iptables rules it might need might not be initialized and due to this things might not work. Simply restart the Docker service:
384 |
385 | ```
386 | service docker restart
387 | ```
388 |
389 |
390 | ```
391 | #######################################################################
392 | # Feel free to edit this file. However, be aware that debconf writes #
393 | # to (and reads from) this file too. In case of doubt, only use #
394 | # 'dpkg-reconfigure -plow arno-iptables-firewall' to edit this file. #
395 | # If you really don't want to use debconf, or if you have specific #
396 | # needs, you're likely better off using placing an additional #
397 | # configuration snippet into/etc/arno-iptables-firewall/conf.d/. #
398 | # Also see README.Debian. #
399 | #######################################################################
400 |
401 |
402 | EXT_IF="eth0"
403 | EXT_IF_DHCP_IP=1
404 | OPEN_TCP="22 80 443"
405 | OPEN_UDP=""
406 | INT_IF="docker0"
407 | NAT=1
408 | INTERNAL_NET="172.17.0.1/16"
409 | NAT_INTERNAL_NET="192.168.1.0/24 192.168.2.0/24 172.17.0.1/16"
410 | OPEN_ICMP=1
411 | ```
412 |
413 |
414 | ### Have issues, comments or questions: [Join us on Gitter](https://gitter.im/etopian/devoply)
415 |
416 | ---
417 | Docker DOES NOT own, operate, license, sponsors or authorizes this site. Docker® is a registered trademark of Docker, Inc. Similarly, WordPress Foundation DOES NOT own, operate, license, sponsors or authorizes this site. WordPress® is a registered trademark of WordPress Foundation. wordpressdocker.com Unofficial WordPress Docker Tutorial is not affiliated with Docker, Inc or WordPress Foundation. This site is a not for profit tutorial made available free of charge.
418 |
--------------------------------------------------------------------------------
/docs/links.md:
--------------------------------------------------------------------------------
1 | # Links
2 |
3 | A control panel that helps provision instances for WordPress and Drupal sites automatically. Also helps manage WordPress.
4 | - [DEVOPly](https://www.devoply.com)
5 |
6 | Uses linking to the MySQL container and includes Apache and FPM in the contianer.
7 | - Official WordPress from Docker Library
8 |
9 | Includes everything you need in a container including the database, gets heavy with too many sites. Also you have to add an Nginx proxy for more than one server.
10 | - https://github.com/eugeneware/docker-wordpress-nginx
11 |
12 | Uses tatum WordPress container, now called Docker Cloud. Goes through the entire process.
13 | -
14 |
15 | - https://intercityup.com/blog/using-docker-to-host-this-wordpress-blog.html
16 | - https://www.sitepoint.com/how-to-use-the-official-docker-wordpress-image/
17 |
--------------------------------------------------------------------------------
/docs/mailgun-ssmtp.md:
--------------------------------------------------------------------------------
1 | # Mailgun with sSMTP
2 |
3 |
4 |
5 | ```bash
6 | apt-get install ssmtp mailutils
7 | ```
8 | ssmtp.conf
9 |
10 | ```bash
11 | # Are users allowed to set their own From: address?
12 | # YES - Allow the user to specify their own From: address
13 | # NO - Use the system generated From: address
14 | #FromLineOverride=YES
15 |
16 | # The user that gets all the mails (UID < 1000, usually the admin)
17 | root=postmaster@domain.com
18 |
19 | # The mail server (where the mail is sent to), both port 465 or 587 should be acceptable
20 | # See also http://mail.google.com/support/bin/answer.py?answer=78799
21 | mailhub=smtp.mailgun.org:587
22 |
23 | # The address where the mail appears to come from for user authentication.
24 | rewriteDomain=domain.com
25 |
26 | # The full hostname
27 | hostname=ks4001046.ip-198-245-49.net
28 |
29 | # Use SSL/TLS before starting negotiation
30 | UseTLS=Yes
31 | UseSTARTTLS=Yes
32 |
33 | # Username/Password
34 | AuthUser=postmaster@domain.com
35 | AuthPass=a6e7fb5c89d354442db807d8919cf061
36 |
37 | # Email 'From header's can
38 | ```
39 |
40 | revaliases
41 | ```
42 | # sSMTP aliases
43 | #
44 | # Format: local_account:outgoing_address:mailhub
45 | #
46 | # Example: root:your_login@your.domain:mailhub.your.domain[:port]
47 | # where [:port] is an optional port number that defaults to 25.
48 |
49 | root:postmaster@domain.com:smtp.mailgun.org:587
50 | ```
--------------------------------------------------------------------------------
/geo.php:
--------------------------------------------------------------------------------
1 | > sitelog.txt
5 | s3cmd rm s3://logs.wordpressdocker.com/logs*
6 | cat logs/*
7 | rm logs/*
8 |
--------------------------------------------------------------------------------
/google65b1080930b21cbb.html:
--------------------------------------------------------------------------------
1 | google-site-verification: google65b1080930b21cbb.html
2 |
--------------------------------------------------------------------------------
/mkdocs.yml:
--------------------------------------------------------------------------------
1 | site_name: WordPress Docker - Unofficial Guide / Tutorial
2 | theme: readthedocs
3 | repo_url: https://github.com/etopian/wordpressdocker
4 | edit_uri: edit/master/docs/
5 | google_analytics: ['UA-63062106-4', 'www.wordpressdocker.com']
6 | site_url: https://www.wordpressdocker.com
7 |
--------------------------------------------------------------------------------
/policy.json:
--------------------------------------------------------------------------------
1 | {
2 | "Version": "2008-10-17",
3 | "Statement": [
4 | {
5 | "Sid": "1",
6 | "Effect": "Deny",
7 | "Principal": {
8 | "AWS": "*"
9 | },
10 | "Action": "s3:GetObject",
11 | "Resource": "arn:aws:s3:::yourbucketname/*",
12 | "Condition": {
13 | "StringNotLike": {
14 | "aws:Referer": [
15 | "http://wordpressdocker.com/*",
16 | "http://*.wordpressdocker.com/*"
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/readthedocs/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/etopian/wordpressdocker/a551ca3dcd86d9935f29e5ea3a882fc280af4bbb/readthedocs/__init__.py
--------------------------------------------------------------------------------
/readthedocs/__pycache__/__init__.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/etopian/wordpressdocker/a551ca3dcd86d9935f29e5ea3a882fc280af4bbb/readthedocs/__pycache__/__init__.cpython-35.pyc
--------------------------------------------------------------------------------
/readthedocs/base.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {%- block site_meta %}
6 |
7 |
8 |
9 | {% if page and page.is_homepage %}{% endif %}
10 | {% if config.site_author %}{% endif %}
11 | {% if config.site_favicon %}
12 | {% else %}{% endif %}
13 | {%- endblock %}
14 |
15 | {%- block htmltitle %}
16 | WordPress Docker{% if page and page.title and not page.is_hompage %} - {{ page.title }}{% endif %}
17 | {%- endblock %}
18 |
19 | {%- block styles %}
20 |
21 |
22 |
23 |
24 |
25 | {%- for path in extra_css %}
26 |
27 | {%- endfor %}
28 | {%- endblock %}
29 |
30 | {%- block libs %}
31 | {% if page %}
32 |
38 | {% endif %}
39 |
40 |
41 |
42 | {%- endblock %}
43 |
44 | {%- block extrahead %} {% endblock %}
45 |
46 | {%- block analytics %}
47 | {% if config.google_analytics %}
48 |
57 | {% endif %}
58 | {%- endblock %}
59 |
60 |
61 |
62 |