Closed Julianoe closed 6 years ago
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
.
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 :
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?