informatica:linux:wordpress:docker
Crear docker-compose.yml y cambiar puerto de 8080 por 8081, 8082 para sucesivas instancias
version: '3.1' services: wordpress: image: wordpress restart: always ports: - 8080:80 environment: WORDPRESS_DB_HOST: db WORDPRESS_DB_USER: exampleuser WORDPRESS_DB_PASSWORD: examplepass WORDPRESS_DB_NAME: exampledb volumes: - wordpress:/var/www/html db: image: mysql:5.7 restart: always environment: MYSQL_DATABASE: exampledb MYSQL_USER: exampleuser MYSQL_PASSWORD: examplepass MYSQL_RANDOM_ROOT_PASSWORD: '1' volumes: - db:/var/lib/mysql volumes: wordpress: db:
Para levantarlo:
docker-compose up -d
Añadimos nginx:
server { listen 80; server_name gameofworks.lobo99.info; location / { proxy_pass http://192.168.1.200:8083; proxy_buffering on; proxy_buffers 12 12k; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; } }
ruth@docker:~$ docker cp Divi/. gameofworkslobo99info_wordpress_1:/var/www/html/wp-content/themes/Divi/
informatica/linux/wordpress/docker.txt · Last modified: 2020/02/28 18:53 by jose