Tag: nginx

nginx setting up variable upstream per virtual host

My aim is to have configurable upstream, so I can use whatever php version I need per project / virtual host. I tried: upstream php { server php7-fpm-alpine:9000; } server { listen 80; server_name somesite.com; root /www/somesite.com; include /etc/nginx/nginx-wp-common.conf; } nginx-wp-common.conf has fastcgi_pass php; My setup works for 1 site, but once I start adding […]

Docker deployment update shared volume

Kind of new with Docker in production I have a design question. What is the best approach to deploy with Docker a PHP app that contains data and info used by other containers in the main application directory that will have to be updated over the builds ? Example (simplify Symfony kind of app): – […]

docker container stops unexpectedly

I have a docker container which stops unexpectedly. The important part of my docker image looks like this: … ENTRYPOINT [“./start.sh”] CMD [“nginx”, “-g”, “daemon off;”] It’s al executed pending the build. Than I start the container with docker run -p 80:8080 myimage:latest I see something like this when I perform docker ps “./start.sh nginx […]

Using a multidomain certificate for artifactory dokcer repo

I have the following a virtual docker repo docker-virtual a remote docker repo dockerhub a local docker repo docker-local docker-local is the default deployment repo. Can I use a multidomain certificate to configure the virtual repo in my reverse proxy? Does the certificate need to support the local repo?

Nginx, WordPress, and SQL

I currently am trying to learn how to use docker and was wondering if there is a way to make a Docker stack that includes WordPress, SQL, and Nginx. Right now I want to have 3 containers running, 1 for each and use nginx as a reverse proxy for my wordpress app. However, every time […]

How could I connect to nginx vhost in Docker container from linked php Docker container?

I want to isolate my new project infrastructure using Docker containers and I’m newbie in Docker. I’m stuck with a problem. First of all I will show example of my config and then I will address the problem. Config example nginx: restart: always image: nginx:latest expose: – 80 ports: – 8181:80 # – 80:80 volumes: […]

AWS EB with Docker, Node and Nginx Config Issues

On AWS, I have configured Elastic BeanStalk to deploy multiple EC2 instances running a Dockerized Node app behind a Elastic Load Balancer. In addition, I have AWS Certificate manager working and loading the site over https via SSL. Here is what I am trying to accomplish: Automatically redirect non www to www.domain.com Automatically redirect http […]

Minor change in ansible playbook does not get updated in target host

My playbook is (among other things) starting a docker container: – name: Restart nginx container docker: name: nginx image: my-nginx state: started ports: – “{{ nginx_port }}:80” volumes: – “{{ host_socket }}:{{ container_socket }}” This is correctly starting the container. But if I decide I need to run nginx in another port, and run again […]

Docker and Nginx proxy_pass between containers

I’m trying to run configuration with Docker, Nginx, Gunicorn and Django. Currently I successfully managed to run my container with Gunicorn and Django app using this command: docker run –publish 8003:8000 user/app:latest Now when I connect to localhost:8003 I see my application running. At this point I would like to set up my Nginx in […]

“Permission denied” in Docker container unless –privileged=true

I’m trying to run an nginx container as a service and share 2 volumes between the host machine and container, so that files in one directory are automatically shared with the other paired directory. My docker-compose.yml is the following: version: ‘2’ services: nginx: image: nginx build: . ports: – “5000:80” volumes: – /home/user1/share:/share/user1 – /home/user2/share:/share/user2 […]

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