feat: update docker config
This commit is contained in:
parent
2468caeeb9
commit
f2d4188ccf
@ -17,6 +17,7 @@ services:
|
||||
- DB_USER=nocobase
|
||||
- DB_PASSWORD=nocobase
|
||||
- DB_TIMEZONE=+08:00
|
||||
- DB_UNDERSCORED=true
|
||||
volumes:
|
||||
- ./storage:/app/nocobase/storage
|
||||
ports:
|
||||
@ -29,5 +30,7 @@ services:
|
||||
MYSQL_PASSWORD: nocobase
|
||||
MYSQL_ROOT_PASSWORD: nocobase
|
||||
restart: always
|
||||
volumes:
|
||||
- ./storage/db/mariadb:/var/lib/mysql
|
||||
networks:
|
||||
- nocobase
|
@ -29,5 +29,7 @@ services:
|
||||
MYSQL_PASSWORD: nocobase
|
||||
MYSQL_ROOT_PASSWORD: nocobase
|
||||
restart: always
|
||||
volumes:
|
||||
- ./storage/db/mysql:/var/lib/mysql
|
||||
networks:
|
||||
- nocobase
|
||||
|
@ -28,5 +28,7 @@ services:
|
||||
POSTGRES_USER: nocobase
|
||||
POSTGRES_DB: nocobase
|
||||
POSTGRES_PASSWORD: nocobase
|
||||
volumes:
|
||||
- ./storage/db/postgres:/var/lib/postgresql/data
|
||||
networks:
|
||||
- nocobase
|
@ -18,6 +18,7 @@
|
||||
"scripts": {
|
||||
"nocobase": "nocobase",
|
||||
"pm": "nocobase pm",
|
||||
"pm2": "nocobase pm2",
|
||||
"dev": "nocobase dev",
|
||||
"dev-server": "nocobase dev --server",
|
||||
"start": "nocobase start",
|
||||
|
@ -16,6 +16,7 @@ module.exports = (cli) => {
|
||||
require('./e2e')(cli);
|
||||
require('./clean')(cli);
|
||||
require('./doc')(cli);
|
||||
require('./pm2')(cli);
|
||||
require('./test')(cli);
|
||||
require('./umi')(cli);
|
||||
require('./upgrade')(cli);
|
||||
|
28
packages/core/cli/src/commands/pm2.js
Normal file
28
packages/core/cli/src/commands/pm2.js
Normal file
@ -0,0 +1,28 @@
|
||||
const chalk = require('chalk');
|
||||
const { Command } = require('commander');
|
||||
const { run, isDev } = require('../util');
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Command} cli
|
||||
*/
|
||||
module.exports = (cli) => {
|
||||
cli
|
||||
.command('pm2')
|
||||
.allowUnknownOption()
|
||||
.action(() => {
|
||||
run('pm2', process.argv.slice(3));
|
||||
});
|
||||
cli
|
||||
.command('pm2-restart')
|
||||
.allowUnknownOption()
|
||||
.action(() => {
|
||||
run('pm2', ['restart', 'all']);
|
||||
});
|
||||
cli
|
||||
.command('pm2-stop')
|
||||
.allowUnknownOption()
|
||||
.action(() => {
|
||||
run('pm2', ['stop', 'all']);
|
||||
});
|
||||
};
|
Loading…
Reference in New Issue
Block a user