env: add WEB_SERVER

This commit is contained in:
vchikalkin 2023-11-02 11:28:43 +03:00
parent 59030c7601
commit 3616e36ed4
3 changed files with 3 additions and 1 deletions

View File

@ -22,6 +22,7 @@ const envSchema = z.object({
.string()
.transform((val) => Number.parseInt(val, 10))
.default('6379'),
WEB_SERVER: z.string(),
});
export default envSchema;

View File

@ -35,7 +35,7 @@ async function bootstrap() {
await app.register(proxy, {
http2: false,
upstream: 'http://localhost:3000',
upstream: `http://${env.WEB_SERVER}`,
});
app.useGlobalPipes(new ValidationPipe({ stopAtFirstError: true }));

View File

@ -25,6 +25,7 @@ services:
- API_CACHE_TTL=${API_CACHE_TTL}
- REDIS_HOST=redis
- MONGO_HOST=mongo
- WEB_SERVER=auth_web:3000
restart: always
networks:
- auth_network