init commit. Skeleton prepared
This commit is contained in:
6
infra/db/init/01_create_databases.sql
Normal file
6
infra/db/init/01_create_databases.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- Executed once on fresh Postgres volume
|
||||
CREATE DATABASE auth_db;
|
||||
CREATE DATABASE profiles_db;
|
||||
CREATE DATABASE match_db;
|
||||
CREATE DATABASE chat_db;
|
||||
CREATE DATABASE payments_db;
|
||||
50
infra/gateway/nginx.conf
Normal file
50
infra/gateway/nginx.conf
Normal file
@@ -0,0 +1,50 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
# Health of gateway itself
|
||||
location = /health {
|
||||
default_type application/json;
|
||||
return 200 '{"status":"ok","gateway":"nginx"}';
|
||||
}
|
||||
location /auth/ {
|
||||
proxy_pass http://auth:8000/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
location /profiles/ {
|
||||
proxy_pass http://profiles:8000/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
location /match/ {
|
||||
proxy_pass http://match:8000/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
location /chat/ {
|
||||
proxy_pass http://chat:8000/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
location /payments/ {
|
||||
proxy_pass http://payments:8000/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user