spurin / diveintoansible-lab

Dive Into Ansible Lab
788 stars 498 forks source link

Cannot browse to http://localhost:1000 #39

Closed FlexKat4 closed 3 years ago

FlexKat4 commented 3 years ago

Hello again,

I'm reaching out as I was able to the run of the lab but only partially. I am unable to reach the website http://localhost:1000 when attempted and receive an error that the page cannot be found.

felixmajor@Felixs-MacBook-Pro diveintoansible-lab % docker-compose up [+] Running 11/11 ⠿ Network diveinto.io Created 3.8s ⠿ Network diveintoansible-lab_default Created 3.8s ⠿ Container ubuntu1 Created 1.1s ⠿ Container centos1 Created 1.1s ⠿ Container ubuntu-c Created 1.0s ⠿ Container docker Created 1.2s ⠿ Container centos2 Created 0.9s ⠿ Container ubuntu2 Created 1.1s ⠿ Container ubuntu3 Created 1.1s ⠿ Container centos3 Created 1.1s ⠿ Container portal Created 0.6s Attaching to centos1, centos2, centos3, docker, portal, ubuntu-c, ubuntu1, ubuntu2, ubuntu3

After confirming that this step should look as the guide provides, I figured I'd circle back to see if there is anything I need to do to initiate the resolution to this.

Thank you,

Flex

FlexKat4 commented 3 years ago

Resolved after a few tries! The link just started working today.

MartynKeigher commented 3 years ago

Add the 'LOCALHOST_OVERRICE' env property to the portal service too. Makes browsing around much easier. Here is an example...

portal:
    hostname: portal
    container_name: portal
    image: spurin/diveintoansible:portal
    environment:
      - NGINX_ENTRYPOINT_QUIET_LOGS=1
      - LOCALHOST_OVERRIDE=192.168.10.15
    depends_on:
      - centos1
      - centos2
      - centos3
      - ubuntu1
      - ...

Replace 192.168.10.15 with the IP of your docker host.

://mk