feat: auth container

This commit is contained in:
nihonium 2025-11-23 04:01:29 +03:00
parent c500116916
commit 0942df1fa4
Signed by: nihonium
GPG key ID: 0251623741027CFC
3 changed files with 22 additions and 1 deletions

View file

@ -38,6 +38,18 @@ services:
depends_on: depends_on:
- postgres - postgres
nyanimedb-auth:
image: meowgit.nekoea.red/nihonium/nyanimedb-auth:latest
container_name: nyanimedb-auth
restart: always
environment:
LOG_LEVEL: ${LOG_LEVEL}
DATABASE_URL: ${DATABASE_URL}
ports:
- "8082:8082"
depends_on:
- postgres
nyanimedb-frontend: nyanimedb-frontend:
image: meowgit.nekoea.red/nihonium/nyanimedb-frontend:latest image: meowgit.nekoea.red/nihonium/nyanimedb-frontend:latest
container_name: nyanimedb-frontend container_name: nyanimedb-frontend

View file

@ -19,6 +19,15 @@ server {
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade; proxy_cache_bypass $http_upgrade;
} }
location /auth/ {
rewrite ^/auth/(.*)$ /$1 break;
proxy_pass http://nyanimedb-auth:8082/;
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;
}
#error_page 404 /404.html; #error_page 404 /404.html;
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;

View file

@ -20,7 +20,7 @@ export type OpenAPIConfig = {
}; };
export const OpenAPI: OpenAPIConfig = { export const OpenAPI: OpenAPIConfig = {
BASE: 'http://127.0.0.1:8082', BASE: '/auth',
VERSION: '1.0.0', VERSION: '1.0.0',
WITH_CREDENTIALS: false, WITH_CREDENTIALS: false,
CREDENTIALS: 'include', CREDENTIALS: 'include',