Best way of integrating Phpmyadmin with Wordpress nginx-proxy letsencrypt configuration
Julianoe opened this issue · 4 comments
It's in the question. I'm looking for a way to extend this awesome package that is the wordpress-nginxproxy-letsencrypt to add a phpmyadmin container.
Do you have some advice or a guide to do it the good way.
For now here is what i tried with a docker-compose.yml file :
version: '3'
services:
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
# environment:
# - PMA_ARBITRARY=1
restart: always
ports:
- 8080:80
volumes:
- /path/to/sessions
links:
- website1_db:db
- website2_db:db
networks:
default:
external:
name: webproxy
I commented out the arbitrary part because i could not connect.
Even without it though the container returns the error message ERROR: Service 'phpmyadmin' has a link to service 'website_1:db' which is undefined.
I thought i was doing it right.
I tried also to do it through a simple command for a single db container and it worked. I think i'm close but i can't figure out the rest :(
docker run --name website1_admin --link=website1_db:db -p 8080:80 --network=webproxy phpmyadmin/phpmyadmin
I could obviously do this for every wordpress/db install but i feel that it is a waste of resources.. am i right or it does not matter ?
Also, i can't find a way to force the access to a certain url (and ideally https). Could we think of something together?
This is not an issue....
But here is a working sample:
version: '3'
services:
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
external_links:
- db
environment:
VIRTUAL_HOST: phpmyadmin.budhi.com.br
networks:
default:
external:
name: webproxy
@Julianoe did you manage to get it working?
I did not fully managed to get it working because i did not have a dedicated host name but tomorrow i'll update the issues
Well you don´t need actualy... you can just substitute as below:
version: '3'
services:
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
external_links:
- db
ports:
- 8080:80
# environment:
# VIRTUAL_HOST: phpmyadmin.budhi.com.br
networks:
default:
external:
name: webproxy
And you access your domain.com:8080
.