Nginx
Создать директорию nginx_config.conf и внутри файл python_microservices
server {
listen 8080;
location /api/firstendpoint {
proxy_pass http://firstendpoint:8000/api/firstendpoint;
}
location /api/secondendpoint {
proxy_pass http://secondendpoint:8000/api/secondendpoint;
}
}
Compose:
version: '3.7'
services:
nginx:
image: nginx:latest
ports:
- "8080:8080"
volumes:
- ./nginx_config.conf:/etc/nginx/conf.d/default.conf
depends_on:
- cast_service
- movie_service