question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide a working example for Mac in README

See original GitHub issue

Hello,

I struggled for a few days to found a working configuration.

Problem, which I had:

  • 503 Service temporary unavailable (because whoami service is using port 8000, not 80)
  • curl: (7) Failed to connect to localhost port 80: Connection refused (because Mac Firewall blocks port 80)
  • in order to open whoami.nginx.container.docker in browser you have to add line 127.0.0.1 whoami.nginx.container.docker in /etc/hosts file

Here is what finally worked for me:

docker-compose.yml:

version: '2'

services:
  nginx:
    image: jwilder/nginx-proxy
    container_name: nginx
    ports:
      - 8080:80
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro

  web:
    image: jwilder/whoami
    container_name: whoami
    ports:
      - 8091:8000
    expose:
      - "8000"
    environment:
      WEB_PORTS: 8000
      VIRTUAL_HOST: whoami.nginx.container.docker

  dockergen:
    image: jwilder/docker-gen
    command: -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
    volumes_from:
      - nginx
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
razbakovcommented, Apr 6, 2017

The first place where I would check is a README file 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating a Read Me File in Markdown - YouTube
Every good project includes documentation. In the third video of our "Getting Started With GitHub" series, “Creating a Read Me File in ...
Read more >
Make a README
Learn how to make a great README for your programming project, and use the editable template to get started.
Read more >
How to create a Readme.md file? - Medium
Create a new file from — →file →new file. Save the file as Readme.md or any suitable name with .md extension. Your file...
Read more >
Readme: the file type simply explained with examples - IONOS
Information can be provided in a readme file without any compatibility issues. Learn all about how these files are structured and find a ......
Read more >
README Best Practices - Tilburg Science Hub
In this building block, we provide you with a template and some examples you can use for your own projects. Markdown. A README...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found