-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (56 loc) · 1.42 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
version: '3.3'
services:
nginx:
build:
context: ./nginx
depends_on:
- wordpress
ports:
- 80:80
- 443:443
restart: always
volumes:
- logs:/var/log/nginx
- certs:/etc/nginx/ssl
- certs:/etc/letsencrypt
- cbroot:/var/www/certbot
db:
image: mysql:5.7
restart: always
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
# MYSQL_RANDOM_ROOT_PASSWORD: '1'
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT}
wordpress:
depends_on:
- db
build: .
restart: always
volumes:
- ./wp-content:/var/www/html/wp-content/
environment:
WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST}
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER}
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD}
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME}
# mailhog for development only
mailhog:
image: mailhog/mailhog:latest
ports:
- 1025:1025 # smtp server
- 8025:8025 # web ui
# certbot:
# image: certbot/certbot:latest
# command: certonly --webroot --webroot-path=/var/www/certbot --email your-email@domain.com --agree-tos --no-eff-email -d domain.com -d www.domain.com
# volumes:
# - certs:/etc/letsencrypt
# - cbroot:/var/www/certbot
volumes:
db_data: {}
logs: {}
certs: {}
cbroot: {}