add configuration files and update docker-compose for hydra and redis services
This commit is contained in:
2
config/back/.env.example
Normal file
2
config/back/.env.example
Normal file
@ -0,0 +1,2 @@
|
||||
REDIS_PASSWORD=
|
||||
HYDRA_PASSWORD=
|
||||
10
config/back/config.yaml
Normal file
10
config/back/config.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
app:
|
||||
port: 8080
|
||||
|
||||
redis:
|
||||
host: redis
|
||||
port: 6379
|
||||
db: 0
|
||||
|
||||
hydra:
|
||||
host: https://oauth2.logidex.ru/admin
|
||||
1
config/hydra/.env
Normal file
1
config/hydra/.env
Normal file
@ -0,0 +1 @@
|
||||
DSN=postgres://postgres:postgres@db:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
|
||||
@ -4,12 +4,12 @@ serve:
|
||||
|
||||
urls:
|
||||
self:
|
||||
issuer: http://oauth2.logidex.ru
|
||||
public: http://oauth2.logidex.ru
|
||||
admin: http://oauth2.logidex.ru
|
||||
consent: http://id.logidex.ru/consent
|
||||
login: http://id.logidex.ru/
|
||||
logout: http://id.logidex.ru/logout
|
||||
issuer: https://oauth2.logidex.ru
|
||||
public: https://oauth2.logidex.ru
|
||||
admin: https://oauth2.logidex.ru
|
||||
consent: https://id.logidex.ru/consent
|
||||
login: https://id.logidex.ru/login
|
||||
logout: https://id.logidex.ru/logout
|
||||
|
||||
strategies:
|
||||
access_token: jwt
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
upstream hydra_public_api {
|
||||
server hydra:4444;
|
||||
server hydra:4444;
|
||||
}
|
||||
upstream hydra_admin_api {
|
||||
server hydra:4445;
|
||||
server hydra:4445;
|
||||
}
|
||||
upstream frontend {
|
||||
server front:3000;
|
||||
server front:3000;
|
||||
}
|
||||
|
||||
upstream backend {
|
||||
server back:8080;
|
||||
}
|
||||
|
||||
server {
|
||||
@ -51,6 +52,15 @@ server {
|
||||
listen 80;
|
||||
server_name id.logidex.ru;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://backend/api/; # Replace with your backend API URL
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://frontend;
|
||||
proxy_set_header Host $http_host;
|
||||
@ -58,4 +68,12 @@ server {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
location /_next/webpack-hmr {
|
||||
proxy_pass http://frontend;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user