-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yml
87 lines (78 loc) · 2.13 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '3.3'
services:
db:
image: mysql:5.7
restart: always
volumes:
#
# Persist our MySQL data
#
- ./data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: wordpressrootpw
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
#
# PHP FPM runs persistently, and services requests over port 9000
# from our webserver.
#
php:
image: wordpress:5-fpm
depends_on:
- db
restart: always
volumes:
#
# Copy in our PHP config for large uploads.
#
- ./php-uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
#
# When first run, this image populates /var/www/html/ with a Wordpress install,
# and we want that to be exported so we have a copy of our code.
#
- ./wordpress:/var/www/html
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
web:
image: nginx
depends_on:
- php
restart: always
volumes:
#
# Import our Nginx configuration for FPM.
#
- ./nginx.conf:/etc/nginx/conf.d/default.conf
#
# The webserver will also need to see our Wordpress install.
#
- ./wordpress:/var/www/html
#
# Write logs here. Note that they will need to be
# rotated on the parent system.
#
- ./logs:/var/log/nginx
https-portal:
image: steveltn/https-portal:1
depends_on:
- web
ports:
- 80:80
- 443:443
restart: always
#
# Save our SSL certs between runs so they aren't regenerated on every single run.
#
volumes:
- ./ssl_certs:/var/lib/https-portal
environment:
DOMAINS: 'localhost -> http://web:80 #local'
#DOMAINS: 'YOUR_FQDN -> http://web:80 #staging' # Uncomment when you want to test a staging cert.
#DOMAINS: 'YOUR_FQDN -> http://web:80 #production' # Uncomment when you are ready for production.
#
# Allow larger files to be uploaded
#
CLIENT_MAX_BODY_SIZE: 64M