Release: weekly deploy
This commit is contained in:
+2
-12
@@ -12,16 +12,13 @@ const { requireCurator } = require('./middleware/auth');
|
||||
const { logCuratorAction } = require('./audit-log');
|
||||
const authRoutes = require('./routes/auth');
|
||||
const { ensurePaintingImages, preloadArtistImagesLocal, replacePaintingImageFromUrl, replaceArtistPortraitFromUrl, clearPaintingImage, deletePainting, clearArtistPortrait, replacePaintingImageFromBuffer, replaceArtistPortraitFromBuffer, IMAGE_DIR } = require('./image-service');
|
||||
const { getVersionInfo } = require('./version-info');
|
||||
const { searchGoogleImagesFirst, searchArtistPortraitFirst, searchPaintingImagesMany, searchArtistPortraitMany, fetchImageBuffer, friendlyImageFetchError, pickExt } = require('../scripts/image-fetcher');
|
||||
|
||||
const app = express();
|
||||
const HOST = process.env.HOST || '0.0.0.0';
|
||||
const PORT = Number(process.env.PORT) || 3001;
|
||||
const PUBLIC_URL = process.env.PUBLIC_URL || '';
|
||||
const APP_ENV = process.env.APP_ENV || (process.env.DB_NAME === 'gallery_prod' ? 'prod' : 'dev');
|
||||
const IMAGE_TAG = process.env.IMAGE_TAG || 'local';
|
||||
const GIT_SHA = process.env.GIT_SHA || '';
|
||||
const APP_VERSION = process.env.npm_package_version || '0.0.0';
|
||||
|
||||
if (process.env.TRUST_PROXY === '1' || process.env.TRUST_PROXY === 'true') {
|
||||
app.set('trust proxy', 1);
|
||||
@@ -1044,14 +1041,7 @@ app.get('/api/bounds', async (req, res) => {
|
||||
});
|
||||
|
||||
app.get('/api/version', async (_req, res) => {
|
||||
res.json({
|
||||
app_env: APP_ENV,
|
||||
app_version: APP_VERSION,
|
||||
image_tag: IMAGE_TAG,
|
||||
git_sha: GIT_SHA,
|
||||
db_name: process.env.DB_NAME || '',
|
||||
public_url: PUBLIC_URL || '',
|
||||
});
|
||||
res.json(getVersionInfo());
|
||||
});
|
||||
|
||||
const CLIENT_DIST = path.join(__dirname, '..', 'client', 'dist');
|
||||
|
||||
Reference in New Issue
Block a user