🐋 ci: Dockerfile.multi rewrite, maintain package integrity (#3772)

* chore: touch server

* chore: dockerfile.multi first pass

* refactor: remove prod-stage build, share dist files instead
This commit is contained in:
Danny Avila 2024-08-24 15:00:51 -04:00 committed by GitHub
parent d54458b3a6
commit 88d8706757
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 30 additions and 33 deletions

View file

@ -39,7 +39,7 @@ const startServer = async () => {
app.get('/health', (_req, res) => res.status(200).send('OK'));
// Middleware
/* Middleware */
app.use(noIndex);
app.use(errorController);
app.use(express.json({ limit: '3mb' }));
@ -48,7 +48,7 @@ const startServer = async () => {
app.use(staticCache(app.locals.paths.dist));
app.use(staticCache(app.locals.paths.fonts));
app.use(staticCache(app.locals.paths.assets));
app.set('trust proxy', 1); // trust first proxy
app.set('trust proxy', 1); /* trust first proxy */
app.use(cors());
if (DISABLE_COMPRESSION !== 'true') {
@ -61,12 +61,12 @@ const startServer = async () => {
);
}
// OAUTH
/* OAUTH */
app.use(passport.initialize());
passport.use(await jwtLogin());
passport.use(passportLogin());
// LDAP Auth
/* LDAP Auth */
if (process.env.LDAP_URL && process.env.LDAP_USER_SEARCH_BASE) {
passport.use(ldapLogin);
}
@ -76,7 +76,7 @@ const startServer = async () => {
}
app.use('/oauth', routes.oauth);
// API Endpoints
/* API Endpoints */
app.use('/api/auth', routes.auth);
app.use('/api/keys', routes.keys);
app.use('/api/user', routes.user);