Merge pull request #361 from Budibase/dockerfile

budibase dockerfile
This commit is contained in:
Martin McKeaveney 2020-06-16 10:29:24 +01:00 committed by GitHub
commit 11db99a123
5 changed files with 39 additions and 14 deletions

View File

@ -39,7 +39,8 @@
let panelDefinition = {}
$: panelDefinition = componentPropDefinition.properties &&
$: panelDefinition =
componentPropDefinition.properties &&
componentPropDefinition.properties[selectedCategory.value]
const onStyleChanged = store.setComponentStyle
@ -88,7 +89,7 @@
{panelDefinition}
onChange={onPropChanged}
onScreenPropChange={store.setPageOrScreenProp}
screenOrPageInstance={$store.currentView !== "component" && $store.currentPreviewItem} />
screenOrPageInstance={$store.currentView !== 'component' && $store.currentPreviewItem} />
{:else if selectedCategory.value === 'events'}
<EventsEditor component={componentInstance} />
{/if}

View File

@ -19,9 +19,9 @@
data.target ? onChange(key, data.target.value) : onChange(key, data)
}
function handleScreenPropChange (name, value) {
onScreenPropChange(name,value)
if(!isPage && name === "name") {
function handleScreenPropChange(name, value) {
onScreenPropChange(name, value)
if (!isPage && name === "name") {
// screen name is changed... change URL
$goto(`./:page/${value}`)
}
@ -40,7 +40,6 @@
$: isPage = screenOrPageInstance && screenOrPageInstance.favicon
$: screenOrPageDefinition = isPage ? pageDefinition : screenDefinition
</script>
{#if screenOrPageInstance}
@ -53,7 +52,7 @@
onChange={handleScreenPropChange}
props={{ ...excludeProps(def, ['control', 'label']) }} />
{/each}
<hr/>
<hr />
{/if}
{#if panelDefinition && panelDefinition.length > 0}

View File

@ -0,0 +1,11 @@
FROM node:12-alpine
WORKDIR /app
# copy files and install dependencies
COPY . ./
RUN yarn
EXPOSE 4001
CMD ["yarn", "run:docker"]

View File

@ -27,6 +27,7 @@
"test:integration": "jest workflow --runInBand",
"test:watch": "jest --watch",
"initialise": "node ../cli/bin/budi init -b local -q",
"run:docker": "node src/index",
"budi": "node ../cli/bin/budi",
"dev:builder": "nodemon ../cli/bin/budi run",
"electron": "electron src/electron.js",

View File

@ -0,0 +1,13 @@
const { resolve } = require("path")
async function runServer() {
const budibaseDir = "~/.budibase"
process.env.BUDIBASE_DIR = resolve(budibaseDir)
const server = await require("./app")()
server.on("close", () => console.log("Server Closed"))
console.log(`Budibase running on ${JSON.stringify(server.address())}`)
}
runServer()