-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
60 lines (57 loc) · 1.51 KB
/
docker-compose.yaml
File metadata and controls
60 lines (57 loc) · 1.51 KB
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
services:
mysql:
image: mysql:8.0
container_name: mysql
restart: always
command: --authentication_policy=mysql_native_password
environment:
MYSQL_DATABASE: wordpress
MYSQL_ROOT_PASSWORD: wordpress
volumes:
- ./mysql:/var/lib/mysql
nginx:
image: nginxproxy/nginx-proxy:latest
container_name: nginx
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./nginx/certs:/etc/nginx/certs
- ./nginx/html:/usr/share/nginx/html
- ./custom-nginx.conf:/etc/nginx/conf.d/custom-nginx.conf
acme:
image: nginxproxy/acme-companion:latest
container_name: acme
restart: always
depends_on:
- nginx
environment:
NGINX_PROXY_CONTAINER: nginx
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./nginx/certs:/etc/nginx/certs
- ./nginx/html:/usr/share/nginx/html
- ./nginx/acme:/etc/acme.sh
wordpress:
image: wordpress:latest
container_name: wordpress
restart: always
depends_on:
- mysql
- nginx
- acme
env_file:
- .env
environment:
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
VIRTUAL_HOST: ${DOMAIN_NAME}
LETSENCRYPT_HOST: ${DOMAIN_NAME}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
volumes:
- ./wordpress:/var/www/html
- ./custom-php.ini:/usr/local/etc/php/conf.d/custom-php.ini