feat: update docker config

This commit is contained in:
chenos 2024-03-28 10:44:55 +08:00
parent 2468caeeb9
commit f2d4188ccf
6 changed files with 37 additions and 0 deletions

View File

@ -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

View File

@ -29,5 +29,7 @@ services:
MYSQL_PASSWORD: nocobase
MYSQL_ROOT_PASSWORD: nocobase
restart: always
volumes:
- ./storage/db/mysql:/var/lib/mysql
networks:
- nocobase

View File

@ -28,5 +28,7 @@ services:
POSTGRES_USER: nocobase
POSTGRES_DB: nocobase
POSTGRES_PASSWORD: nocobase
volumes:
- ./storage/db/postgres:/var/lib/postgresql/data
networks:
- nocobase

View File

@ -18,6 +18,7 @@
"scripts": {
"nocobase": "nocobase",
"pm": "nocobase pm",
"pm2": "nocobase pm2",
"dev": "nocobase dev",
"dev-server": "nocobase dev --server",
"start": "nocobase start",

View File

@ -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);

View 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']);
});
};