mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
refactor: new dev/prod containers
- Use a single Dockerfile for all Zeppelin services - Add a Dockerfile in project root that can be used by app hosting services - Provide a standalone and lightweight prod setup - Standalone is the same as the old setup, with mysql+nginx - Lightweight only runs bot+backend+dash, no mysql/nginx - Remove mounted mysql data folders for dev and prod - This resolves permission issues caused by the mount - The mysql service uses a regular named volume now - Simplify .env options and clearly separate different prod setups - Remove update.sh - Different setups require different update procedures, so a common update.sh no longer works
This commit is contained in:
parent
730b8c1d6b
commit
509d96ce83
30 changed files with 948 additions and 274 deletions
|
@ -6,8 +6,7 @@
|
|||
"scripts": {
|
||||
"build": "rimraf dist && cross-env NODE_ENV=production webpack --config webpack.config.js",
|
||||
"build-debug": "rimraf dist && cross-env NODE_ENV=development webpack --config webpack.config.js",
|
||||
"watch": "cross-env NODE_ENV=development webpack-dev-server",
|
||||
"watch-build": "rimraf dist && NODE_ENV=development webpack --config webpack.config.js --watch"
|
||||
"watch": "cross-env NODE_ENV=development webpack-dev-server"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.5",
|
||||
|
@ -37,7 +36,9 @@
|
|||
"webpack-merge": "^5.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fastify/static": "^7.0.1",
|
||||
"@highlightjs/vue-plugin": "^1.0.2",
|
||||
"fastify": "^4.26.2",
|
||||
"highlight.js": "^11.8.0",
|
||||
"humanize-duration": "^3.27.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
|
|
14
dashboard/serve.js
Normal file
14
dashboard/serve.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
const fastify = require("fastify")({ logger: true });
|
||||
const fastifyStatic = require("@fastify/static");
|
||||
const path = require("path");
|
||||
|
||||
fastify.register(fastifyStatic, {
|
||||
root: path.join(__dirname, "dist"),
|
||||
});
|
||||
|
||||
fastify.listen({ port: 3002, host: '0.0.0.0' }, (err, address) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
console.log(`Server listening on ${address}`);
|
||||
});
|
|
@ -175,7 +175,7 @@ if (process.env.NODE_ENV === "production") {
|
|||
devServer: {
|
||||
...(process.env.DEV_HOST ? { host: process.env.DEV_HOST } : undefined),
|
||||
historyApiFallback: true,
|
||||
port: 1234,
|
||||
port: 3002,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue