config: add include custom upstream and location
This commit is contained in:
parent
43126e3425
commit
a683bc30cc
0
config/include/location.conf
Normal file
0
config/include/location.conf
Normal file
0
config/include/upstream.conf
Normal file
0
config/include/upstream.conf
Normal 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;
|
||||
}
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user