-
Notifications
You must be signed in to change notification settings - Fork 22
/
docker-compose.yaml
87 lines (75 loc) · 2.12 KB
/
docker-compose.yaml
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
86
87
services:
wordpress:
image: wordpress:latest
container_name: wordpress
expose:
- "80"
restart: unless-stopped
depends_on:
- mysql
- nginx-proxy
volumes:
- ./html:/var/www/html
env_file: .env
environment:
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_USER: ${MYSQL_USER}
WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD}
WORDPRESS_DB_NAME: ${MYSQL_DATABASE}
VIRTUAL_HOST: tudominio.com #debe ser un dominio válido y DNS apuntando a este servidor
LETSENCRYPT_HOST: tudominio.com #debe ser un dominio válido y DNS apuntando a este servidor
mysql:
image: mariadb:latest
container_name: mysql
volumes:
- ./db_data:/var/lib/mysql
expose:
- "3306"
restart: unless-stopped
env_file: .env
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
phpmyadmin:
image: phpmyadmin:latest
container_name: wppma
restart: unless-stopped
depends_on:
- mysql
ports:
- "8080:80"
environment:
PMA_HOST: mysql
PMA_USER: ${MYSQL_USER}
PMA_PASSWORD: ${MYSQL_PASSWORD}
nginx-proxy:
image: jwilder/nginx-proxy:latest
container_name: nginx-proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- ./html:/usr/share/nginx/html
nginx-proxy-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion:latest
container_name: nginx-proxy-letsencrypt
restart: always
depends_on:
- nginx-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- ./html:/usr/share/nginx/html
environment:
- [email protected] #debe ser un email válido
- NGINX_PROXY_CONTAINER=nginx-proxy
volumes:
certs: {}
vhost.d: {}