docker-nginx-proxy | Dockerized nginx reverse proxy | Proxy library
kandi X-RAY | docker-nginx-proxy Summary
kandi X-RAY | docker-nginx-proxy Summary
Image providing a reverse-proxy using Nginx HTTP server with support for HTTPS virtual hosts. You can use this image as it is, or you can extend it and add configuration files for your virtual hosts.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of docker-nginx-proxy
docker-nginx-proxy Key Features
docker-nginx-proxy Examples and Code Snippets
Community Discussions
Trending Discussions on docker-nginx-proxy
QUESTION
I am trying to build out a local development environment and I am struggling to get it to work. I want docker and docker compose to run nginx as a reverse proxy and a postgresql database
Project Structure
...ANSWER
Answered 2021-Nov-17 at 15:43There a couple of things you have to keep in mind:
- Docker compose by default uses the service name as hostname for inter container networking
- Nginx need to know the upstream first
- You don't need Nginx in a Dockerfile, use it directly in
docker-compose.yml
instead. And mount your config file into the container. - You need to dockerize your front-end and back-end to connect them to nginx
- Always expose on
0.0.0.0
instead of127.0.0.1
orlocalhost
inside your docker container, see this answer.
An example repo where I use nginx, docker and docker-compose: https://gitlab.com/datails/api .
Example default.conf
:
QUESTION
ANSWER
Answered 2020-Oct-15 at 03:40After some research I finally got what was wrong: I mapped my local nginx configuration to the wrong file on the container.
So to fix it a changed the volume in my docker-compose.yml
From:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install docker-nginx-proxy
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page