mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-08 08:01:02 -04:00
further refactoring
This commit is contained in:
parent
d3573d1f54
commit
3ef07e5d91
4 changed files with 15 additions and 5 deletions
|
@ -11,6 +11,8 @@ DOCKER_COMPOSE_APP_DEV_PORT_TARGET=9001
|
||||||
# The env var DEFAULT_PAD_TEXT seems to be mandatory in the latest version of etherpad.
|
# The env var DEFAULT_PAD_TEXT seems to be mandatory in the latest version of etherpad.
|
||||||
DOCKER_COMPOSE_APP_DEV_ENV_DEFAULT_PAD_TEXT="Welcome to etherpad"
|
DOCKER_COMPOSE_APP_DEV_ENV_DEFAULT_PAD_TEXT="Welcome to etherpad"
|
||||||
|
|
||||||
|
DOCKER_COMPOSE_APP_DEV_ADMIN_PASSWORD=
|
||||||
|
|
||||||
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_DATABASE=db
|
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_DATABASE=db
|
||||||
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_PASSWORD=etherpad-lite-password
|
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_PASSWORD=etherpad-lite-password
|
||||||
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_USER=etherpad-lite-user
|
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_USER=etherpad-lite-user
|
|
@ -87,7 +87,9 @@ 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/
|
||||||
COPY --chown=etherpad:etherpad ./src/bin ./src/bin
|
COPY --chown=etherpad:etherpad ./src/bin ./src/bin
|
||||||
COPY --chown=etherpad:etherpad ${SETTINGS} "${EP_DIR}"/settings.json
|
COPY --chown=etherpad:etherpad ./var ./var
|
||||||
|
COPY --chown=etherpad:etherpad ./node_modules ./node_modules
|
||||||
|
COPY --chown=etherpad:etherpad ${SETTINGS} ./settings.json
|
||||||
|
|
||||||
RUN { [ -z "${ETHERPAD_PLUGINS}" ] || \
|
RUN { [ -z "${ETHERPAD_PLUGINS}" ] || \
|
||||||
pnpm install --no-save --legacy-peer-deps ${ETHERPAD_PLUGINS}; } && \
|
pnpm install --no-save --legacy-peer-deps ${ETHERPAD_PLUGINS}; } && \
|
||||||
|
@ -101,7 +103,10 @@ FROM build as production
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV ETHERPAD_PRODUCTION=true
|
ENV ETHERPAD_PRODUCTION=true
|
||||||
|
|
||||||
COPY --chown=etherpad:etherpad ./ ./
|
COPY --chown=etherpad:etherpad ./src ./src
|
||||||
|
COPY --chown=etherpad:etherpad ./var ./var
|
||||||
|
COPY --chown=etherpad:etherpad ./node_modules ./node_modules
|
||||||
|
COPY --chown=etherpad:etherpad ${SETTINGS} ./settings.json
|
||||||
|
|
||||||
# Plugins must be installed before installing Etherpad's dependencies, otherwise
|
# Plugins must be installed before installing Etherpad's dependencies, otherwise
|
||||||
# npm will try to hoist common dependencies by removing them from
|
# npm will try to hoist common dependencies by removing them from
|
||||||
|
|
|
@ -33,7 +33,7 @@ Starting dev server:
|
||||||
docker compose exec app bash -c "./src/bin/run.sh"
|
docker compose exec app bash -c "./src/bin/run.sh"
|
||||||
```
|
```
|
||||||
|
|
||||||
For production, please create your own docker compose file and change the `target` property in the build section to `production`, for instance:
|
For production, please create your own docker compose file and change the `target` property in the build section to `production`. In addition, change the NODE_ENV in environment to production. For instance:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker compose -f docker-compose-production.yml up -d
|
docker compose -f docker-compose-production.yml up -d
|
||||||
|
|
|
@ -14,12 +14,14 @@ services:
|
||||||
tty: true
|
tty: true
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
volumes:
|
volumes:
|
||||||
- .:/opt/etherpad-lite
|
- ./src:/opt/etherpad-lite/src
|
||||||
- node_modules:/opt/etherpad-lite/src/node_modules
|
- node_modules:/opt/etherpad-lite/src/node_modules
|
||||||
|
- pnpm-store:/opt/etherpad-lite/src/.pnpm-store
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: development
|
NODE_ENV: development
|
||||||
|
ADMIN_PASSWORD: ${DOCKER_COMPOSE_APP_DEV_ADMIN_PASSWORD}
|
||||||
DB_CHARSET: ${DOCKER_COMPOSE_APP_DEV_ENV_DB_CHARSET:-utf8mb4}
|
DB_CHARSET: ${DOCKER_COMPOSE_APP_DEV_ENV_DB_CHARSET:-utf8mb4}
|
||||||
DB_HOST: postgres
|
DB_HOST: postgres
|
||||||
DB_NAME: ${DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_DATABASE:?}
|
DB_NAME: ${DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_DATABASE:?}
|
||||||
|
@ -57,3 +59,4 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
node_modules:
|
node_modules:
|
||||||
|
pnpm-store:
|
Loading…
Add table
Add a link
Reference in a new issue