Hi,
I´m trying to install 2 instalations of wordpress, the first one is ok, no problems. But i can´t, and i have tried diferent stuff, install the second wordpress instalation.
This is my first Stack, this runs ok
version: '2'
services:
db:
image: mysql:5.7
volumes:
- /srv/dev-disk-by-label-1TB/Config/wordpress-2/db:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
ports:
- 3316:3306 # change port for every new deployment ???
wordpress:
image: wordpress:latest
ports:
- 8977:80
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_NAME: wordpress #muda-se?
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
volumes:
- /srv/dev-disk-by-label-1TB/Config/wordpress-2:/var/www/html
links:
- db
Alles anzeigen
This is the second Stack that fails... most of the log errors are because it cant connect to the database
version: '2'
services:
db:
image: mysql:5.7
volumes:
- /srv/dev-disk-by-label-1TB/Config/wordpress-1/db:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordddddddddddddddddd # change this = a WORDPRESS_DB_PASSWORD em baixo
MYSQL_DATABASE: wordpress
# MYSQL_USER: wordpress
# MYSQL_PASSWORD: wordpress
ports:
- 3315:3306 # change port for every new deployment
networks:
- wordpress1
wordpress:
image: wordpress:latest # https://hub.docker.com/_/wordpress/
ports:
- 8978:80 # change port for every deployment. Get nginx config to look here
restart: always
environment:
WORDPRESS_DB_HOST: db
# WORDPRESS_DB_HOST: db:3306 #no original esta :3306
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: user_root
WORDPRESS_DB_PASSWORD: wordddddddddddddddddd # change this = a MYSQL_ROOT_PASSWORD em cima
volumes:
- /srv/dev-disk-by-label-1TB/Config/wordpress-1:/var/www/html
# - ./client1/php.conf.uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
# - ./srv/dev-disk-by-label-1TB/Config/wordpress-1/wp-app:/var/www/html # Full wordpress project
# - ./srv/dev-disk-by-label-1TB/Config/wordpress-1/wp-app:/var/www/html # Full wordpress project
# links:
# - db
depends_on:
- db
networks:
- wordpress1
# retirado daqui https://webcache.googleusercontent.com/search?q=cache:KriqZuqbXnUJ:https://www.findingflair.com/2019/03/17/wordpress-hosting-with-portainer-nginx-and-docker/+&cd=1&hl=en&ct=clnk&gl=pt
Alles anzeigen
Sometimes i have this in the logs of the second stack MySQL Connection Error: (1045) Access denied for user 'user_root'@'172.23.0.3' (using password: YES) sometimes is other error, but always related to not be able to connect to the database.
Can someone help with the second stack, so i can run a second (third) instalation of wordpress? Thanks.
The idea is to have diferent sites with diferent domains (not multisite functionality of wordpress)