config: add include custom upstream and location

This commit is contained in:
vchikalkin 2023-10-18 13:17:34 +03:00
parent 43126e3425
commit a683bc30cc
4 changed files with 73 additions and 79 deletions

View File

View File

View File

@ -1,13 +1,3 @@
worker_processes auto;
events {
worker_connections 1024;
}
http {
upstream web {
server web:3000;
}
@ -20,6 +10,8 @@ http {
server application:80;
}
include /etc/nginx/include/upstream.conf;
server {
listen 80;
@ -89,5 +81,6 @@ http {
add_header 'Content-Type' 'application/json';
return 200 'UP';
}
}
include /etc/nginx/include/location.conf;
}

View File

@ -42,6 +42,7 @@ services:
image: nginx:alpine
volumes:
- ./config/nginx.conf:/etc/nginx/templates/default.conf.template
- ./config/include:/etc/nginx/include
restart: always
depends_on:
- web