71 lines
1.6 KiB
YAML
71 lines
1.6 KiB
YAML
|
# wordpress/docker-compose.yml
|
||
|
version: '3.7'
|
||
|
|
||
|
services:
|
||
|
db:
|
||
|
image: mariadb
|
||
|
container_name: wordpress-db
|
||
|
volumes:
|
||
|
- db-data:/var/lib/mysql
|
||
|
networks:
|
||
|
- default
|
||
|
restart: always
|
||
|
environment:
|
||
|
MYSQL_ROOT_PASSWORD: PASSWORD_ROOT
|
||
|
MYSQL_DATABASE: NOMBRE_BD
|
||
|
MYSQL_USER: NOMBRE_USUARIO
|
||
|
MYSQL_PASSWORD: PASSWORD_USUARIO
|
||
|
wordpress:
|
||
|
depends_on:
|
||
|
- db
|
||
|
image: wordpress:latest
|
||
|
container_name: wordpress
|
||
|
environment:
|
||
|
WORDPRESS_DB_HOST: db:3306
|
||
|
WORDPRESS_DB_NAME: NOMBRE_BD
|
||
|
WORDPRESS_DB_USER: NOMBRE_USUARIO
|
||
|
WORDPRESS_DB_PASSWORD: PASSWORD_USUARIO
|
||
|
volumes:
|
||
|
- ./wp-data:/var/www/html
|
||
|
networks:
|
||
|
- proxy
|
||
|
- default
|
||
|
restart: always
|
||
|
labels:
|
||
|
- "traefik.enable=true"
|
||
|
- "traefik.docker.network=proxy"
|
||
|
- "traefik.http.routers.wordpress-secure.entrypoints=websecure"
|
||
|
- "traefik.http.routers.wordpress-secure.rule=Host(`DOMINIO`)"
|
||
|
|
||
|
pma:
|
||
|
image: ${PMA_IMAGE}
|
||
|
restart: always
|
||
|
networks:
|
||
|
- proxy
|
||
|
- default
|
||
|
depends_on:
|
||
|
- db
|
||
|
environment:
|
||
|
MYSQL_USER: NOMBRE_USUARIO
|
||
|
MYSQL_PASSWORD: PASSWORD_USUARIO
|
||
|
MYSQL_ROOT_PASSWORD: PASSWORD_ROOT
|
||
|
PMA_HOST: db:3306
|
||
|
labels:
|
||
|
- "traefik.enable=true"
|
||
|
- "traefik.docker.network=proxy"
|
||
|
- "traefik.http.routers.pma-secure.entrypoints=websecure"
|
||
|
- "traefik.http.routers.pma-secure.rule=Host(`pmawp.DOMINIO`)"
|
||
|
- "traefik.http.routers.me.tls.certresolver=mytlschallenge"
|
||
|
|
||
|
|
||
|
|
||
|
volumes:
|
||
|
db-data:
|
||
|
name: wp-db-data
|
||
|
wp-data:
|
||
|
name: wp-data
|
||
|
|
||
|
networks:
|
||
|
proxy:
|
||
|
external: true
|