P
P
Paul Petrov2020-08-10 19:27:17
Nginx
Paul Petrov, 2020-08-10 19:27:17

Need advice: is the Nginx - Docker - Nginx (proxy) bundle correct?

Hey!

DevOps friends, give me advice, please!
I want an outside opinion.

Essence

The project has a Dockerfile with multi-stage builds:

  1. FROM node:13.10.1-alpine as builder- in it the application is built in static
  2. FROM nginx:1.14-alpine- final image with application files and Nginx "on distribution"


There is a Jenkinsfile, a pipeline that runs code through tests, starts building a new image, creates a container based on it, starts a new container and stops the old one.

On the server where the container should spin, Nginx is installed as a proxy to the application in the container using proxy_pass http://localhost:<номер порта>

Thus, the chain is obtained:
Client -> Nginx (proxy) -> Nginx (in Docker) -> App

The scheme works, but I thought, maybe is there an easier option?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivan Koryukov, 2020-08-11
@MadridianFox

There is nothing criminal in this. If that's what you need, then do it. If you see a way to simplify the system - simplify.
The main thing is not to forget to throw in the real ip and the scheme in the header.
By the way, k8s, for example, works like this. There 80,443 port listens to the so-called. ingres - usually the same nginx, whose config is set via a yml file. And now it accepts all requests and, depending on the settings, proxies them to backends, including internal nginx's.

N
NO, 2015-03-18
@Mihail9575

You can try to pervert and install mac on a virtual machine...

S
ssk16, 2015-03-18
@ssk16

How about downloading chrome?

A
Alexander Miranovich, 2015-03-18
@aleks_664

And here you can download chrome yourself, read carefully, I need exactly mac OS

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question