preview-generation service Fix (#2311)
* Fix for broken preview-generation service running inside a docker image * Reverted some possible dubious changes
This commit is contained in:
committed by
GitHub
parent
3be53f6db5
commit
8550d3f762
@@ -73,6 +73,7 @@ services:
|
||||
|
||||
USE_FRONTEND_2: true
|
||||
FRONTEND_ORIGIN: 'http://127.0.0.1'
|
||||
ONBOARDING_STREAM_URL: 'https://latest.speckle.systems/projects/843d07eb10'
|
||||
|
||||
preview-service:
|
||||
build:
|
||||
@@ -84,8 +85,11 @@ services:
|
||||
mem_limit: '3000m'
|
||||
memswap_limit: '3000m'
|
||||
environment:
|
||||
HOST: '127.0.0.1'
|
||||
LOG_LEVEL: 'info'
|
||||
PG_CONNECTION_STRING: 'postgres://speckle:speckle@postgres/speckle'
|
||||
ports:
|
||||
- 127.0.0.1:3001:3001
|
||||
|
||||
webhook-service:
|
||||
build:
|
||||
|
||||
@@ -26,7 +26,8 @@ const server = http.createServer(app)
|
||||
* Listen on provided port, on all network interfaces.
|
||||
*/
|
||||
|
||||
server.listen(port, '127.0.0.1')
|
||||
const host = process.env.HOST || '127.0.0.1'
|
||||
server.listen(port, host)
|
||||
server.on('error', onError)
|
||||
server.on('listening', onListening)
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import './bootstrap'
|
||||
import { LegacyViewer } from '@speckle/viewer'
|
||||
import { DefaultViewerParams } from '@speckle/viewer'
|
||||
// import { logger } from '../../observability/logging'
|
||||
|
||||
console.log('Initialising Viewer')
|
||||
const v = new LegacyViewer(document.getElementById('renderer'), DefaultViewerParams)
|
||||
window.v = v
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/** This is because of @speckle/shared imporing these, but we plan on improving this */
|
||||
window.znv = {}
|
||||
window.zod = {}
|
||||
@@ -43,6 +43,11 @@ const config = {
|
||||
}
|
||||
]
|
||||
},
|
||||
externals: {
|
||||
znv: 'znv',
|
||||
zod: 'zod'
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new CleanWebpackPlugin({ cleanStaleWebpackAssets: false }),
|
||||
new HtmlWebpackPlugin({
|
||||
@@ -57,10 +62,7 @@ const config = {
|
||||
path.resolve('./node_modules'),
|
||||
path.resolve('.render_page/src')
|
||||
],
|
||||
extensions: ['.json', '.js'],
|
||||
fallback: {
|
||||
tty: false
|
||||
}
|
||||
extensions: ['.json', '.js']
|
||||
},
|
||||
devServer: {
|
||||
contentBase: path.join(__dirname, 'example'),
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
import { parseEnv } from 'znv'
|
||||
import { z } from 'zod'
|
||||
|
||||
//INFO
|
||||
// As a convention all feature flags should be prefixed with a FF_
|
||||
const featureFlagSchema = z.object({
|
||||
FF_AUTOMATE_MODULE_ENABLED: z.boolean().default(false),
|
||||
FF_GENDOAI_MODULE_ENABLED: z.boolean().default(false),
|
||||
FF_TEST_AUTOMATIONS_ENABLED: z.boolean().default(false)
|
||||
})
|
||||
|
||||
function parseFeatureFlags() {
|
||||
//INFO
|
||||
// As a convention all feature flags should be prefixed with a FF_
|
||||
const featureFlagSchema = z.object({
|
||||
FF_AUTOMATE_MODULE_ENABLED: z.boolean().default(false),
|
||||
FF_GENDOAI_MODULE_ENABLED: z.boolean().default(false),
|
||||
FF_TEST_AUTOMATIONS_ENABLED: z.boolean().default(false)
|
||||
})
|
||||
return parseEnv(process.env, featureFlagSchema.shape)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user