-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update docker-compose tar (#145)
- Loading branch information
Showing
13 changed files
with
501 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const path = require('path'); | ||
const process = require('process'); | ||
const fs = require('fs'); | ||
const chalk = require('chalk'); | ||
const { spawn, spawnSync } = require('child_process'); | ||
const webpack = require('webpack'); | ||
const openBrowser = require('react-dev-utils/openBrowser'); | ||
const WebpackDevServer = require('webpack-dev-server'); | ||
const config = require('./webpack.dev'); | ||
|
||
const compiler = webpack(config); | ||
const portal = config.devServer.https ? 'https' : 'http'; | ||
const port = config.devServer.port; | ||
const ip = config.devServer.host || '127.0.0.1'; | ||
|
||
const goServerPath = path.resolve(process.cwd(), './server'); | ||
|
||
const goServerProcess = spawn('go run main.go', { cwd: goServerPath, shell: true }); | ||
goServerProcess.stdout.on('data', (data) => console.log(chalk.blue(`server::${data.toString().slice(0, -1)}`))); | ||
goServerProcess.on('close', () => | ||
console.log(chalk.red('\ngo server 启动失败,服务器将不可用,请切换到 server 目录调试异常\n')) | ||
); | ||
|
||
const server = new WebpackDevServer(config.devServer, compiler); | ||
server.startCallback(() => { | ||
console.log(`Listening at localhost: ${port}`); | ||
console.log('Opening your system browser...'); | ||
openBrowser(`${portal}://${ip}:${port}`); | ||
}); | ||
|
||
process.on('exit', (code) => { | ||
console.log(`process exits with code: ${code}`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Nebula Studio Docker Deploy | ||
|
||
### Package: | ||
|
||
`tar -czf nebula-graph-studio-$VERSION.tar.gz | ||
|
||
### Use: | ||
|
||
``` | ||
tar -xvf nebula-graph-studio-$VERSION.tar.gz | ||
cd nebula-graph-studio-$VERSION | ||
docker-compose pull | ||
docker-compose up -d | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: '3.4' | ||
services: | ||
web: | ||
image: vesoft/nebula-graph-studio:v3.3.0-beta | ||
environment: | ||
USER: root | ||
UPLOAD_DIR: ${MAPPING_DOCKER_DIR} | ||
ports: | ||
- 7001:7001 | ||
networks: | ||
- nebula-web | ||
|
||
networks: | ||
nebula-web: |
Oops, something went wrong.