new Skill() { Id = Guid.NewGuid(), Name = "Knowledge of programming", Level = Levels.Expert, ProfessionId = Professions.FirstOrDefault(p => p.Name == "Software Developer").Id },
new Skill() { Id = Guid.NewGuid(), Name = "Stress resistance", Level = Levels.Expert, ProfessionId = Professions.FirstOrDefault(p => p.Name == "Software Developer").Id },
new Skill() { Id = Guid.NewGuid(), Name = "The ability to cook", Level = Levels.Middle, ProfessionId = Professions.FirstOrDefault(p => p.Name == "Cook").Id },
new Skill() { Id = Guid.NewGuid(), Name = "Knowledge of plumbing", Level = Levels.Middle, ProfessionId = Professions.FirstOrDefault(p => p.Name == "Plumber").Id }
};
}
}
```
## Реализация gateway при помощи nginx
Добавил nginx.conf:
```conf
server {
listen 8080;
listen [::]:8080;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location /worker-1/ {
proxy_pass http://worker-1:80/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Prefix /worker-1;
}
location /worker-2/ {
proxy_pass http://worker-2:80/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Prefix /worker-2;
}
}
```
Результат, после выполнения команды `docker-compose up`: