Skip to content

Commit 81e758d

Browse files
Merge pull request #1 from carlwillimott/development
Create docker-compose file.
2 parents d421de8 + a8ba400 commit 81e758d

File tree

4 files changed

+99
-0
lines changed

4 files changed

+99
-0
lines changed

custom.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
file_uploads = On
2+
memory_limit = 256M
3+
upload_max_filesize = 64M
4+
max_input_vars = 3000
5+
post_max_size = 64M
6+
max_execution_time = 600

default

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
server {
2+
listen 80;
3+
listen [::]:80;
4+
server_name _;
5+
return 301 https://$host$request_uri;
6+
}
7+
8+
server {
9+
listen 443 ssl http2 default_server;
10+
listen [::]:443 ssl http2 default_server;
11+
12+
root /var/www/html/example;
13+
index index.html index.htm index.php;
14+
15+
server_name _;
16+
17+
include /config/nginx/proxy-confs/*.subfolder.conf;
18+
19+
include /config/nginx/ssl.conf;
20+
21+
client_max_body_size 0;
22+
23+
location / {
24+
try_files $uri $uri/ /index.php?$args @app;
25+
}
26+
27+
location @app {
28+
proxy_pass http://wordpress;
29+
proxy_set_header Host $host;
30+
proxy_redirect off;
31+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
32+
proxy_set_header X-Forwarded-Proto https;
33+
proxy_set_header X-Real-IP $remote_addr;
34+
}
35+
36+
}

docker-compose.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
version: '3.3'
2+
3+
services:
4+
5+
letsencrypt:
6+
image: linuxserver/letsencrypt
7+
container_name: letsencrypt
8+
depends_on:
9+
- wordpress
10+
volumes:
11+
- ./config:/config
12+
- ./default:/config/nginx/site-confs/default
13+
environment:
14+
- EMAIL=email@example.com
15+
- URL=www.example.com
16+
- VALIDATION=http
17+
- TZ=Europe/London
18+
- PUID=500
19+
- PGID=500
20+
ports:
21+
- "443:443"
22+
- "80:80"
23+
24+
wordpress:
25+
image: wordpress:latest
26+
container_name: wordpress
27+
hostname: wordpress
28+
depends_on:
29+
- db
30+
restart: always
31+
ports:
32+
- "8080:80"
33+
volumes:
34+
- /var/www/html/example/wp-content:/var/www/html/wp-content
35+
- /var/www/html/example/custom.ini:/usr/local/etc/php/conf.d/custom.ini
36+
environment:
37+
WORDPRESS_DB_HOST: db
38+
WORDPRESS_DB_USER: wp_db_user
39+
WORDPRESS_DB_PASSWORD: wp_db_pass
40+
WORDPRESS_DB_NAME: wp_db_name
41+
WORDPRESS_CONFIG_EXTRA: |
42+
define( 'WP_MEMORY_LIMIT', '96M' );
43+
44+
db:
45+
image: mysql:5.7
46+
container_name: db
47+
volumes:
48+
- /var/lib/mysql:/var/lib/mysql
49+
restart: always
50+
ports:
51+
- "3306:3306"
52+
environment:
53+
MYSQL_ROOT_PASSWORD: mysql_root_pass
54+
MYSQL_DATABASE: wp_db_name
55+
MYSQL_USER: wp_db_user
56+
MYSQL_PASSWORD: wp_db_pass

wp-content/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)