Tag: nginx

Nginx and uwsgi connection refused when placed in separate docker containers

I am setting up a Django project and using combination of nginx and uwsgi to serve them. Plus, I am using Docker to put django+uwsgi in one container and nginx in other. For testing purpose, I want to set this up locally and I want to use a custom domain name as well for testing. […]

Unable to load balance using Docker, Consul and nginx

What I want to achive is load balancing using this stack: Docker, Docker Compose, Registrator, Consul, Consul Template, NGINX and, finally, a tiny service that prints out “Hello world” in browser. So, at this moment I have a docker-compose.yml file. It looks like so: version: ‘2’ services: accent: build: context: ./accent image: accent container_name: accent […]

Docker swarm with nginx as cache: 502 bad gateway

I’ve used Docker swarm for creating a cluster composed by 1 manager and 2 worker, everyone on vm (created by docker-machine). i’ve created a “cdn service” that caches, or pass request to backend (a tomcat container, on port 8080). My docker version is 1.13-rc2 This is config file of my nginx image: proxy_cache_path /tmp/nginx levels=1:2 […]

Docker compose, link file outside container

I’m working with docker-compose for a laravel project and nginx. This is my docker-compose.yml : version: ‘2’ services: backend: image: my_image depends_on: – elastic – mysql mysql: image: mysql:8.0.0 nginx: depends_on: – backend image: my_image ports: – 81:80 So, my Laravel project is in the container backend, and If I run the command : docker-compose […]

Connecting a Dockerized MongoDb instance, behing a reverse Nginx proxy on EC2

I try to connect Robomongo (or any other MongoDb UI) to a mongo instance, which is dockerized and behind an NGinx reverse-proxy (also dockerized, using jwilder/nginx-proxy) on a EC2 Container-Service instance. err screenshot here I have an application running using this mongo instance, on the same network, working like a charm ; so we know […]

How to make distinct versions (development and production) of JS code?

I develop small web application, distributed in Docker container, based on nginx image. It contains plain html and js code, without frameworks. In JS code there is access to remote host via WebSockets. There is difference in environments: during testing on localhost, it works via http, on production server it uses https. So URL, which […]

Docker + Nginx: Getting proxy_pass to work

I’m having a problem trying to get Nginx to proxy a path to another server that is also running in Docker. To illustrate, I’m using Nexus server as an example. This is my first attempt… docker-compose.yml:- version: ‘2’ services: nexus: image: “sonatype/nexus3” ports: – “8081:8081” volumes: – ./nexus:/nexus-data nginx: image: “nginx” ports: – “80:80” volumes: […]

Flask Nginx Guincorn/uwsgi docker configuration [closed]

I want to setup a Flask webiste on digitalocean with some links that launch some games either backed by tornando/twisted or to other Flask websites. The architecture for the website can be shown in the following diagram: Most of the tutorials I have seen Example 1, Example 2 , Example 3 and some stackoverflow answers […]

implementing reverse proxy with nginx and docker containers with different ports

i have three docker containers on different ports and would like to implement reverse proxy with nginx to each of the containers so that i can navigate to each of the containers by passing a keyword instead of ports. Like Instead of http://localhost:3000 i want to pass like http://localhost/app1 I created the nginx image with […]

docker run can't find application

my project structure is: /docker-test /app /static …. /templates …. -__init__.py …. -nginx.conf -supervisord.conf -uwsgi.ini -Dockerfile -app.py -requirements.txt I normally run the app by going into /docker-test>python app.py Dockerfile: FROM python:2.7 # Install uWSGI RUN pip install uwsgi # Standard set up Nginx ENV NGINX_VERSION 1.9.11-1~jessie RUN apt-key adv –keyserver hkp://pgp.mit.edu:80 –recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 \ && […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.