mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Fixed docker start.
This commit is contained in:
parent
b6433a91fd
commit
9767a78b78
4 changed files with 19 additions and 5 deletions
14
Dockerfile
14
Dockerfile
|
@ -91,6 +91,7 @@ COPY --chown=etherpad:etherpad ./var ./var
|
||||||
COPY --chown=etherpad:etherpad ./bin ./bin
|
COPY --chown=etherpad:etherpad ./bin ./bin
|
||||||
COPY --chown=etherpad:etherpad ./pnpm-workspace.yaml ./package.json ./
|
COPY --chown=etherpad:etherpad ./pnpm-workspace.yaml ./package.json ./
|
||||||
|
|
||||||
|
|
||||||
FROM build as development
|
FROM build as development
|
||||||
|
|
||||||
COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/pnpm-lock.yaml ./src/
|
COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/pnpm-lock.yaml ./src/
|
||||||
|
@ -98,12 +99,23 @@ COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/pnpm-lock.yaml ./
|
||||||
RUN bin/installDeps.sh && { [ -z "${ETHERPAD_PLUGINS}" ] || \
|
RUN bin/installDeps.sh && { [ -z "${ETHERPAD_PLUGINS}" ] || \
|
||||||
pnpm install --workspace-root ${ETHERPAD_PLUGINS}; }
|
pnpm install --workspace-root ${ETHERPAD_PLUGINS}; }
|
||||||
|
|
||||||
|
FROM build as buildProd
|
||||||
|
|
||||||
|
COPY --chown=etherpad:etherpad ./src ./src
|
||||||
|
|
||||||
|
RUN bin/installDeps.sh && { [ -z "${ETHERPAD_PLUGINS}" ] || \
|
||||||
|
pnpm install --workspace-root ${ETHERPAD_PLUGINS}; }
|
||||||
|
|
||||||
|
RUN pnpm run next-build
|
||||||
|
|
||||||
|
|
||||||
FROM build as production
|
FROM build as production
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV ETHERPAD_PRODUCTION=true
|
ENV ETHERPAD_PRODUCTION=true
|
||||||
|
|
||||||
COPY --chown=etherpad:etherpad ./src ./src
|
COPY --chown=etherpad:etherpad --from=buildProd /opt/etherpad-lite/src/.next/ ./src/.next/
|
||||||
|
COPY --chown=etherpad:etherpad ./src/ ./src/
|
||||||
|
|
||||||
RUN bin/installDeps.sh && { [ -z "${ETHERPAD_PLUGINS}" ] || \
|
RUN bin/installDeps.sh && { [ -z "${ETHERPAD_PLUGINS}" ] || \
|
||||||
pnpm install --workspace-root ${ETHERPAD_PLUGINS}; }
|
pnpm install --workspace-root ${ETHERPAD_PLUGINS}; }
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
"dev": "pnpm --filter ep_etherpad-lite run dev",
|
"dev": "pnpm --filter ep_etherpad-lite run dev",
|
||||||
"prod": "pnpm --filter ep_etherpad-lite run prod",
|
"prod": "pnpm --filter ep_etherpad-lite run prod",
|
||||||
"ts-check": "pnpm --filter ep_etherpad-lite run ts-check",
|
"ts-check": "pnpm --filter ep_etherpad-lite run ts-check",
|
||||||
"ts-check:watch": "pnpm --filter ep_etherpad-lite run ts-check:watch"
|
"ts-check:watch": "pnpm --filter ep_etherpad-lite run ts-check:watch",
|
||||||
|
"next-build": "pnpm --filter ep_etherpad-lite run build-next"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ep_etherpad-lite": "workspace:./src"
|
"ep_etherpad-lite": "workspace:./src"
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {ArgsExpressType} from "../../types/ArgsExpressType";
|
||||||
const eejs = require('../../eejs');
|
const eejs = require('../../eejs');
|
||||||
import next from 'next'
|
import next from 'next'
|
||||||
|
|
||||||
const app = next({dev: true})
|
const app = next({dev: process.env.NODE_ENV != 'production'})
|
||||||
const handle = app.getRequestHandler()
|
const handle = app.getRequestHandler()
|
||||||
/**
|
/**
|
||||||
* Add the admin navigation link
|
* Add the admin navigation link
|
||||||
|
|
|
@ -123,7 +123,8 @@
|
||||||
"dev": "node --import tsx node/server.ts",
|
"dev": "node --import tsx node/server.ts",
|
||||||
"prod": "node --import tsx node/server.ts",
|
"prod": "node --import tsx node/server.ts",
|
||||||
"ts-check": "tsc --noEmit",
|
"ts-check": "tsc --noEmit",
|
||||||
"ts-check:watch": "tsc --noEmit --watch"
|
"ts-check:watch": "tsc --noEmit --watch",
|
||||||
|
"build-next": "next build"
|
||||||
},
|
},
|
||||||
"version": "1.9.7",
|
"version": "1.9.7",
|
||||||
"license": "Apache-2.0"
|
"license": "Apache-2.0"
|
||||||
|
|
Loading…
Reference in a new issue