docker-compose.yml com nginx-proxy
raisiqueira opened this issue · 1 comments
raisiqueira commented
tenho esse docker-compose, já está ok para funcionar um WordPress
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- ./data/certs:/etc/nginx/certs:ro
- /etc/nginx/vhost.d
- /usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./data/certs:/etc/nginx/certs:rw"
environment:
NGINX_DOCKER_GEN_CONTAINER: nginx-proxy
wp-db:
image: mariadb:latest
container_name: wp-db
volumes:
- ./data/banco:/var/lib/mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: root_password
wp-api:
image: wordpress:4.8
container_name: wp-api
restart: unless-stopped
volumes:
- ./data/wordpress:/var/www/html
- ./data/wordpress/wp-content:/var/www/html/wp-content
environment:
WORDPRESS_DB_PASSWORD: user_password
VIRTUAL_HOST: site.com.br, www.site.com.br
LETSENCRYPT_HOST: site.com.br, www.site.com.br
LETSENCRYPT_EMAIL: meu@email.com
evertramos commented
Legal!
A única diferença é que não monto o /var/run/docker.sock
em um container para acesso externo.
Caso tenha algum problema com nosso script post um novo issue com detalhes.