Tag: nginx

How to run rails app in docker container with nginx running on host machine?

I’m working on the scenario where I need to have: 1. nginx running on the host machine 2. rails app running inside docker container My initial work included adding Dockerfile into rails app directory on host which looks like this: ubuntu@ubuntu-xenial:~/rails_docker$ cat Dockerfile FROM ruby:2.1-onbuild ENV HOME /home/rails/webapp RUN apt-get update -qq && apt-get install […]

docker – NGINX Proxy + Let's encrypt

I’m starting with Docker. On start I want to set up simple server on nginx with proxy and SSL (only local on my machine) so I do somethink like this: version: ‘2’ services: nginx-proxy: image: jwilder/nginx-proxy container_name: nginx-proxy ports: – “80:80” – “443:443” volumes: – ./certs:/etc/nginx/certs:ro – /etc/nginx/vhost.d – /var/run/docker.sock:/tmp/docker.sock:ro – /usr/share/nginx/html labels: – com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true […]

Nginx status page in Docker

I have a server which hosts several Docker containers including an Nginx reverse proxy to serve content. In order to get status of this server I have added the following location block: location /nginx_status { stub_status on; access_log off; allow 127.0.0.1; allow 172.0.0.0/8; deny all; } Under normal circumstances I would only have opened up […]

How to build multi tenant application using docker

I am pretty much new to the docker concept and know basics of it. I just wanted to know how can we build multi tenant application using docker. Where the containers will use the local hosted database with different schema.With the nginx we can do reverse proxy but how we can achieve it? because every […]

404 on Nginx running on docker (uwsgi)

I have been battling with this and can’t get my head around it. I have a simple Dockerfile which works and I use supervisord as CMD to start nginx and uwsgi. And it does the job but I get back 404. So what I do is to instead start the docker with /bin/bash and manually […]

Should docker image be bundled with code?

We are building a SaaS application. I don’t have (for now – for this app) high demands on availability. It’s mostly going to be used in a specific time zone and for business purposes only, so scheduled restarting at 3 in the morning shouldn’t be a problem at all. It is an ASP.NET application running […]

Getting wordpress docker to run on local host

I have followed this github and I my localhost port 80 is not showing anything https://github.com/eugeneware/docker–wordpress–nginx this is the terminal output Successfully built f4843e2f3e47 bash-3.2$ docker run -p 80:80 –name docker-wordpress-nginx -d docker-wordpress-nginx 08665dbffdbbf7678b57d62766f367f503e2f9444e11ea86ea2bb6aa932127fd bash-3.2$ docker start docker-wordpress-nginx docker-wordpress-nginx bash-3.2$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 08665dbffdbb docker-wordpress-nginx:latest “/bin/bash /start.sh 18 […]

Nginx dockerized accessing host IIS website on a given port

I’m running docker on windows 10. Some details form docker info Server Version: 17.06.0-ce Operating System: Alpine Linux v3.5 I need to use nginx as reverse porxy to web app running under my local IIS(e.g. http://localhost:90) that’s my nginx default.config server { listen 4430; server_name localhost; #root /usr/share/nginx/html; location / { proxy_pass http://10.0.75.1;#works #proxy_pass http://10.0.75.1:90;#does […]

VirtualBox and Nginx very slowly serving cached static JS and CSS files

Apparently this is a rather known issue: Vagrant/VirtualBox/Apache2 Strange Cache Behaviour, http://smotko.si/nginx-static-file-problem/, https://twitter.com/meinharrd/status/580098162716774400, that attempting to use VirtualBox with Nginx or Apache exhibits buggy behavior (modifying a file will update the contents, but not the length, so making it shorter leads to garbage at the end, and making it longer just truncates at the original […]

Reverse proxying with dockerized nginx

I’m building a multi-container application with Docker. The full environment is on github should you wish to recreate it, but I include what I believe to be the relevant parts below for convenience. My nginx Dockerfile is like so: FROM ubuntu:14.04 MAINTAINER Garry Cairns ENV REFRESHED_AT 2015-02-11 # get the nginx package and set it […]

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