Tag: nginx

Understanding Docker container resource usage

I have server running Ubuntu 16.04 with Docker 17.03.0-ce running an Nginx container. That server also has ConfigServer Security & Firewall installed. Shortly after starting the Nginx container I start receiving emails about “Excessive resource usage” with the following details: Time: Fri Mar 24 00:06:02 2017 -0400 Account: systemd-timesync Resource: Process Time Exceeded: 1820 > […]

proxy'ing between docker containers

I have a docker setup with the following rails api backend mysql db redis db node/react frontend (webpack) nginx serving the frontend (the rails backend is currently being served through the builtin puma server – I think I will move it to the same nginx server runing the node app) My problem is that the […]

Docker, nginx and several sites on one server

I have server with nginx and one working app. I want to add several apps to this servers. I would like to assimilate a few things for myself. What is the difference between load balancer and reverse proxy? In which situations should I use the first, and in which situations should I use the second? […]

Nginx docker container not accepting and serving flask from container

So I have banging my head on this issue for the past hours, and I have got a docker-compose.yml file version: ‘2’ services: web: restart: always build: ./web_app expose: – “8000” ports: – “8000:8000” volumes: – ./web_app:/data/web command: /usr/local/bin/gunicorn web_interface:app -w 4 -t 90 –log-level=debug -b 0.0.0.0:8000 –reload depends_on: – postgres nginx: restart: always build: […]

Docker – nginx with custom config

I am trying to configure a LEMP dev environment with docker and am having trouble with nginx because I can’t seem to restart nginx once it has it’s new configuration. docker-compose.yml: version: ‘3’ services: nginx: image: nginx ports: – ‘8080:80’ volumes: – ./nginx/log:/var/log/nginx – ./nginx/config/default:/etc/nginx/sites-available/default – ../wordpress:/var/www/wordpress php: image: php:fpm ports: – 9000:9000 mysql: image: […]

HTTPS on Elastic Beanstalk (Docker Multi-container)

I’ve been looking around and haven’t found much content with regards to a best practice when it comes to setting up HTTPS/SSL on Amazon Elastic Beanstalk with a Multi-container Docker environment. There is a bunch of stuff when it comes to single container configuration, but nothing when it comes to multi-container. My Dockerrun.aws.json looks like […]

How to map a virtual host to a container in docker?

I am trying to setup a LEMP local development environment using Docker. Following is my docker-composer.yml: version: ‘2’ services: apache: build: context: ./docker/apache-php7 dockerfile: Dockerfile image: foo/apache-php7 volumes: – .:/var/www/html ports: – “80:80” – “443:443” networks: – localnet node: build: context: ./docker/node dockerfile: Dockerfile image: foo/node volumes: – .:/var/www/html networks: – localnet mysql: image: mysql:5.7 […]

Restarting process with pid 1 in docker swarm container (replica)

I have docker nginx running in docker swarm. I want to change settings of nginx without container restart. I replaced nginx conf file inside container but I cannot reload configuration Tried root@xxx:/# service nginx Usage: /etc/init.d/nginx {start|stop|status|restart|reload|force-reload|upgrade|configtest} root@xxx:/# service nginx reload [….] Reloading nginx: nginxstart-stop-daemon: warning: failed to kill 1: Permission denied failed! root@xxx:/# service […]

Nginx in Docker container won't run PHP

I’m beginner with Docker, and I’m trying to build my own image: Ubuntu + Nginx + PHP. So, I have a directory called test. Inside directory two other directories, app and sites-enabled. Also, there’s a Dockerfile, with content: FROM ubuntu:trusty RUN apt-get update && \ apt-get install -y nginx php5-fpm php5-mysql php-apc php5-imagick php5-imap php5-mcrypt […]

How to make communicate between nginx and php container

I have PHP web application and i want to convert it into docker. I have these containers mysql php nginx I have source code in my host folder as /var/www/site1 Now when i launch nginx , then i can mount site1 to nginx as /usr/nginx/share/html But i am not sure how does i link with […]

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