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.

Empty upstream with docker-compose.yml

See original GitHub issue

Currently trying to use the docker-compose approach for owncloud.

I added

environment:
      - VIRTUAL_HOST=${DOMAIN}
      - VIRTUAL_PORT=80
      ...
expose:
      - 80

to the docker-compose.yml and removed the ‘ports’ key since we don’t need them.

But the upstream in the default.conf file is empty:

# test.cloud.code.ag
upstream test.cloud.code.ag {
}
server {
        server_name test.cloud.code.ag;
        listen 80 ;
        access_log /var/log/nginx/access.log vhost;
        location / {
                proxy_pass http://test.cloud.code.ag;
        }
}

When adding the IP manually

upstream test.cloud.code.ag {
server 172.18.0.4;
}

I just get 504 Gateway Time-out.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
hitaloscommented, May 12, 2017

Yours containers (nginx and owncloud) needs to be in the same network. If you are using separeted docker-compose.yml files, in version ‘2’ the stacks are created with a particular networks.

Set network_mode: bridge to use the same default network that would be used in docker run… command.

1reaction
hitaloscommented, May 13, 2017

When not specifying, version ‘1’ is used and the network_mode default is bridge.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Empty upstream with docker-compose.yml · Issue #819 - GitHub
Currently trying to use the docker-compose approach for owncloud. I added environment: - VIRTUAL_HOST=${DOMAIN} - VIRTUAL_PORT=80 ...
Read more >
Nginx can't find upstream node app when running via Docker ...
With this update to the docker-compose.yml file the Nginx config will be as follows: events { worker_connections 1024; } http { upstream ......
Read more >
Docker compose : Nginx reverse proxy with multiple containers
A reverse proxy is a server that sits between internal applications and external clients, forwarding client requests to the appropriate server.
Read more >
Dockerizing a NodeJS , Express, Redis ... - DEV Community ‍ ‍
Step 1. Create a Docker compose file. Create an empty file with the below content and save it by name - "docker-compose.yml".
Read more >
Overview | Docker Documentation
Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application's services....
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