Tag: nginx

Permission denied @ rb_sysopen – log/application.log (Errno::EACCES)

Hi I am using docker to deploy my rails app using phusion/passenger image. Here is my Dockerfile: FROM phusion/passenger-ruby22:0.9.19 # set correct environment variables ENV HOME /root ENV RAILS_ENV production # Use baseimage-docker’s init system. CMD [“/sbin/my_init”] # Expose Nginx HTTP service EXPOSE 80 # Start Nginx / Passenger RUN rm -f /etc/service/nginx/down # Remove […]

replicationcontroller not showed in kubernetes

I’ve just installed Kuberentes on Vagrant (one master and one node). I deployed 3 nginx pods: $ ./cluster/kubectl.sh run my-nginx –image=nginx –replicas=3 –port=80 They were all running fine. I decided to delete one pod and a new pod was recreated immediatly (what I did expect). So it works fine. But the problem is that I […]

How to forward upstream from nginx to upstream server

I am trying to reverse-proxy an ejabberd connection manager with nginx in docker. Following is my docker-compose file version: ‘2’ services: nginx: image: nginx ports: – “80:80” – “443:443” depends_on: – ejabberd links: – ejabberd ejabberd: image: ejabberd:16.04 depends_on: – mysql ports: – “5280:5280” links: – mysql mysql: image: mysql:5.6 ports: – “3306:3306” The images […]

Docker Nginx with Angular JS – Load Static CSS, Images, JS with dynamic url

We are moving our legacy deployment to Docker Containers. All services will be running in seperate docker containers. Services includes Postgres, Redis, JobProcessor, LogProcessor, Nginx with Consul template, Consul, Registrator, Rabbitmq and the Platform(Node JS). We have splitted these services as Master and Platform. Master services includes all the above mentioned services except the platform. […]

How do I share the contents of a file two-way between host and container?

I am pretty sure it used to work this way, but now I can’t make it work anymore… This is the problem: $ docker run -d -p 80:80 –name frontend -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf -v $(pwd)/htpasswd:/htpasswd nginx I want to have this nginx.conf file that I want to edit in the host and, then, simply run $ […]

Docker container not accessible in host machine

Some of my containers are running a web server (PHP, NodeJS) in production. If we take the example of the NodeJS container, this is its configuration docker-compose.yml version: ‘2’ services: webapp: build: . volumes_from: – data links: – db:db – redis:redis ports: – ‘8080:3000′ restart: always … With this configuration, I’m able to access to […]

Setting-up containers reverse proxy

I try to set up a reverse proxy in front of multiple containers including gitlab using nginx. Basically, when trying to access mydomain.com/gitlab, I want to be forwarded to mydomain.com:7777 Both servers are running over their own containers and both are up and running. However, no request is forwarded to gitlab. Here my config.d file […]

Docker/nginx [windows10] – change page on linked folder and show changes directly in the browser

Question: How can I change the index.html file in docker/nginx and see the changed results in my browser? The index.html is on a private folder linked to the standard nginx folder. What did I do: After installing docker and nginx via the official pages, I created a folder under /Users/me123/docker/webapp/html. In this folder I created […]

nginx ipv6 communication with docker containers

I’ve a service listening to 8080 port. This one is not a container. Then, I’ve created a nginx container using oficial image: docker run –name nginx -d -v /root/nginx/conf:/etc/nginx/conf.d -p 443:443 -p 80:80 nginx After all: # netstat -tupln | grep 443 tcp6 0 0 :::443 :::* LISTEN 3482/docker-proxy # netstat -tupln | grep 80 […]

Install nginx dynamic module using docker compose

Usually in nginx to compile a third part module you should use this command: ./configure –add–module=path/to/your/new/module/directory Then using: make And finally: make install But using docker I can’t go into nginx path and run these commands. How could I add “configure” command to my docker-compose.yml file? EDIT: I’ve tried to create a simple Dockerfile like […]

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