Open leevh opened 8 years ago
I'm using IP based mappings for the project. If I change that in docker-compose.yml the web container starts, but the site still doesn't load.
@leevh what is your OS? Please always specify OS.
Uninstall functionality is currently in development.
Looks like you have port 80 explicitly exported in your docker-compose.yml
for web
service. This conflicts with Drude reverse proxy service. Re-installing will not help in this case.
Can you post here your docker-compose.yml
?
Most likely for web
you have something like
ports:
- "80:80"
...
Instead you should have
ports:
- "80"
...
environment:
- VIRTUAL_HOST=myproject.drude
Replace myproject.drude
in VIRTUAL_HOST variable above with your site hostname.
Take a look at this example yml https://github.com/blinkreaction/drude-d7-testing/blob/master/docker-compose.yml.dist
Please try changing your docker-compose.yml
and starting services with dsh up
again. After that you should be able to access your site as myproject.drude
.
If you're still not able to access your site then you would need to put it into your hosts file (/etc/hosts
).
On Mac/Win that would be:
192.168.10.10 myproject.drude
Not recommended way: alternatively you can stop Drude system services. This functionality is only available in development version at the moment. You can update to it with
DRUDE_BRANCH=develop dsh update dsh
After that you will be able to stop reverse proxy with dsh stop proxy
. After proxy is stopped dsh up
should be able to start your web container with hardcoded 80
port. But I would strongly recommend changing docker-compose.yml instead in the way described above.
Sorry about that, here is dsh sysinfo:
https://gist.github.com/leevh/eafd25b02cd8b99a19a85bee711c35d1
and docker-compose.yml
https://gist.github.com/leevh/708b35e9bd9c3a107f0f8080235bd6bf
I was using dedicated IPs for this project
@leevh got it. So my recommendation would be stop using dedicated IPs in your docker-compose.yml
. This is not required to work with multiple projects anymore. And this use-case was actually missed and compatibility with it was lost.
It's recommended to update all your projects to use flexible external port and virtual host name instead. i.e. in case of your docker-compose:
# Web node
web:
hostname: web
image: blinkreaction/drupal-apache:2.2-stable
ports:
- "80"
- "443"
volumes:
# Project root folder mapping
- &project_root ".:/var/www"
links:
- cli
environment:
- VIRTUAL_HOST=automata_local.drude
Drude includes 3 default system services at the moment: dns
, vhost-proxy
and ssh-agent
.
You can see them running if you run dsh status --all
user@work:~/projects/drude-d7-testing$ dsh status --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9f57163039ab blinkreaction/ssh-agent:stable "/run.sh ssh-agent" 5 seconds ago Up 4 seconds ssh-agent
23a1c594e547 blinkreaction/dns-discovery:stable "/opt/entrypoint.sh s" 5 seconds ago Up 4 seconds 192.168.10.10:53->53/udp dns
3ce9be38b66e blinkreaction/nginx-proxy:stable "supervisord -n" 6 seconds ago Up 5 seconds 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp vhost-proxy
a2d3477d9698 blinkreaction/drupal-apache:2.2-stable "/opt/startup.sh apac" 2 weeks ago Up 2 weeks 0.0.0.0:32775->80/tcp, 0.0.0.0:32774->443/tcp druded7testing_web_1
2aac2ef43deb blinkreaction/drupal-cli:stable "/opt/startup.sh gosu" 2 weeks ago Up 2 weeks 9000/tcp druded7testing_cli_1
0e4d3a0021f3 blinkreaction/drupal-mysql:5.5 "/entrypoint.sh mysql" 2 weeks ago Up 2 weeks 0.0.0.0:32773->3306/tcp druded7testing_db_1
Look at last column for names. You'll see 3 of them running. If they are not running on your system for some reason please run dsh reset system
to start them.
dns
will resolve *.drude domain into container IP's. Please try running nslookup test.drude
. It should resolve to 192.168.10.10
. If it doesn't please run dsh install prerequisites
to set up this resolution.
After that your Drude site should be available as automata_local.drude
(provided of course you have this site set up as Drupal subsite or you have default Drupal site).
p.s. You can always stand up a Drupal 7 test project we created for learning purposes and see how it's done there. https://github.com/blinkreaction/drude-d7-testing
It is as easy as checking out and running dsh init
P.S. If for some reason you still need to use IP binding please follow that "Not recommended way" above. Update dsh to develop version and stop Drude proxy.
DRUDE_BRANCH=develop dsh update dsh
dsh stop proxy
@achekulaev thank you very much, this is awesome info and by following your steps got drude working again!
Just curious, is the drude-d8-testing project up to date like the drude-d7-testing project? I noticed a lot of difference in the .drude folder of each.
thanks again for the awesome help and for open sourcing an awesome dev tool!
Drude Mac OS uninstall
Remove ~/.drude Remove old resolver /etc/resolver/drude Remove /etc/exports export Use brew to uninstall vagrant and virtualbox if you don't need them Remove /usr/local/bin/dsh
Wondering if there are any docs for completely cleaning a system of drude. I only ask because I tried updating today to dsh 1.20.0 and I'm getting multiple errors. I was hoping to start over from scratch.
The errors are:
On dsh up for a project:
After trying to purge everything and run dsh install prerequisites, I got:
Not really sure what to do now, any advice would be great, thanks