From 5a50bc0b3e85dc2d3ea70d800af578d950b3ac66 Mon Sep 17 00:00:00 2001 From: blitzwing Date: Fri, 13 Sep 2024 23:24:20 +0000 Subject: [PATCH] Update docker-compose.yml --- docker-compose.yml | 70 +++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 554207d..0642b85 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,26 +1,50 @@ -version: "2.1" services: - installer: - image: nicholaswilde/cryptpad - container_name: cryptpad - ports: - - 3000:3000 - restart: unless-stopped - environment: - - TZ=America/Los_Angeles # optional - - PUID=0 # optional - - PGID=0 # optional + app: + user: "0:0" + image: etherpad/etherpad:latest + tty: true + stdin_open: true volumes: - - blob:/blob - - block:/block - - customize:/customize - - config:/config - - data:/data - - datastore:/datastore + - plugins:/opt/etherpad-lite/src/plugin_packages + - etherpad-var:/opt/etherpad-lite/var + depends_on: + - postgres + environment: + NODE_ENV: production + ADMIN_PASSWORD: ${DOCKER_COMPOSE_APP_ADMIN_PASSWORD:-admin} + DB_CHARSET: ${DOCKER_COMPOSE_APP_DB_CHARSET:-utf8mb4} + DB_HOST: postgres + DB_NAME: ${DOCKER_COMPOSE_POSTGRES_DATABASE:-etherpad} + DB_PASS: ${DOCKER_COMPOSE_POSTGRES_PASSWORD:-admin} + DB_PORT: ${DOCKER_COMPOSE_POSTGRES_PORT:-5432} + DB_TYPE: "postgres" + DB_USER: ${DOCKER_COMPOSE_POSTGRES_USER:-admin} + # For now, the env var DEFAULT_PAD_TEXT cannot be unset or empty; it seems to be mandatory in the latest version of etherpad + DEFAULT_PAD_TEXT: ${DOCKER_COMPOSE_APP_DEFAULT_PAD_TEXT:- enter your notes.} + DISABLE_IP_LOGGING: ${DOCKER_COMPOSE_APP_DISABLE_IP_LOGGING:-true} + SOFFICE: ${DOCKER_COMPOSE_APP_SOFFICE:-null} + TRUST_PROXY: ${DOCKER_COMPOSE_APP_TRUST_PROXY:-true} + restart: always + ports: + - "${DOCKER_COMPOSE_APP_PORT_PUBLISHED:-9003}:${DOCKER_COMPOSE_APP_PORT_TARGET:-9003}" + + postgres: + image: postgres:15-alpine + environment: + POSTGRES_DB: ${DOCKER_COMPOSE_POSTGRES_DATABASE:-etherpad} + POSTGRES_PASSWORD: ${DOCKER_COMPOSE_POSTGRES_PASSWORD:-admin} + POSTGRES_PORT: ${DOCKER_COMPOSE_POSTGRES_PORT:-5432} + POSTGRES_USER: ${DOCKER_COMPOSE_POSTGRES_USER:-admin} + PGDATA: /var/lib/postgresql/data/pgdata + restart: always + # Exposing the port is not needed unless you want to access this database instance from the host. + # Be careful when other postgres docker container are running on the same port + # ports: + # - "5432:5432" + volumes: + - postgres_data:/var/lib/postgresql/data + volumes: - blob: - block: - customize: - config: - data: - datastore: \ No newline at end of file + postgres_data: + plugins: + etherpad-var: