chore: update Dockerfile
Some checks are pending
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase frontEnd test / frontend-test (18) (push) Waiting to run

This commit is contained in:
chenos 2024-11-29 17:42:54 +08:00
parent 52dffcf414
commit 397e2165a8
2 changed files with 15 additions and 5 deletions

View File

@ -49,10 +49,13 @@ RUN cd /app \
FROM node:20.13-bullseye-slim
RUN apt-get update && apt-get install -y nginx libaio1 \
&& apt-get install -y --no-install-recommends postgresql-common gnupg \
&& /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y \
&& apt-get install -y --no-install-recommends postgresql-client-16 \
RUN apt-get update && apt-get install -y --no-install-recommends wget gnupg \
&& rm -rf /var/lib/apt/lists/*
RUN sh -c 'echo "deb http://mirrors.ustc.edu.cn/postgresql/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
RUN wget --quiet -O - http://mirrors.ustc.edu.cn/postgresql/repos/apt/ACCC4CF8.asc | apt-key add -
RUN apt-get update && apt-get -y --no-install-recommends install nginx libaio1 postgresql-client-16 postgresql-client-17 \
&& rm -rf /var/lib/apt/lists/*
RUN rm -rf /etc/nginx/sites-enabled/default

View File

@ -67,7 +67,14 @@ module.exports = (cli) => {
const instances = opts.instances || process.env.CLUSTER_MODE;
const instancesArgs = instances ? ['-i', instances] : [];
if (opts.daemon) {
run('pm2', ['start', ...instancesArgs, `${APP_PACKAGE_ROOT}/lib/index.js`, '--', ...process.argv.slice(2)]);
await run('pm2', [
'start',
...instancesArgs,
`${APP_PACKAGE_ROOT}/lib/index.js`,
'--',
...process.argv.slice(2),
]);
process.exit();
} else {
run(
'pm2-runtime',