From 954721a438e53f58b038f1ca2a06e6efaaa35233 Mon Sep 17 00:00:00 2001 From: Jannik Streek Date: Mon, 16 Sep 2024 14:24:46 +0200 Subject: [PATCH] add prod docker for testing --- docker-compose.prod.yml | 75 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 docker-compose.prod.yml diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml new file mode 100644 index 00000000000..cf34180bf8e --- /dev/null +++ b/docker-compose.prod.yml @@ -0,0 +1,75 @@ +version: "3.8" + +# Add this file to extend the docker-compose setup, e.g.: +# docker-compose build --no-cache +# docker-compose up -d --build --force-recreate + +services: + app: + build: + context: . + target: production + args: + ETHERPAD_PLUGINS: >- + ep_image_upload + ep_headings2 + ep_align + ep_font_color + ep_embedded_hyperlinks2 + ep_helmet + ep_font_size + ep_disable_imports + ETHERPAD_GITHUB_PLUGINS: >- + kitsteam/ep_push2delete + kitsteam/ep_delete_empty_pads + kitsteam/ep_comments_page#main + kitsteam/ep_delete_after_delay + tty: true + stdin_open: true + volumes: + - plugins:/opt/etherpad-lite/src/plugin_packages + - etherpad-var:/opt/etherpad-lite/var + depends_on: + - postgres + environment: + # change from production to production if needed + NODE_ENV: production + ADMIN_PASSWORD: ${DOCKER_COMPOSE_APP_PROD_ADMIN_PASSWORD} + DB_CHARSET: ${DOCKER_COMPOSE_APP_PROD_ENV_DB_CHARSET:-utf8mb4} + DB_HOST: postgres + DB_NAME: ${DOCKER_COMPOSE_POSTGRES_PROD_ENV_POSTGRES_DATABASE:?} + DB_PASS: ${DOCKER_COMPOSE_POSTGRES_PROD_ENV_POSTGRES_PASSWORD:?} + DB_PORT: ${DOCKER_COMPOSE_POSTGRES_PROD_ENV_POSTGRES_PORT:-5432} + DB_TYPE: "postgres" + DB_USER: ${DOCKER_COMPOSE_POSTGRES_PROD_ENV_POSTGRES_USER:?} + # 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_PROD_ENV_DEFAULT_PAD_TEXT:- } + DISABLE_IP_LOGGING: ${DOCKER_COMPOSE_APP_PROD_ENV_DISABLE_IP_LOGGING:-true} + SOFFICE: ${DOCKER_COMPOSE_APP_PROD_ENV_SOFFICE:-null} + TRUST_PROXY: ${DOCKER_COMPOSE_APP_PROD_ENV_TRUST_PROXY:-true} + restart: always + ports: + - "${DOCKER_COMPOSE_APP_PROD_PORT_PUBLISHED:-9001}:${DOCKER_COMPOSE_APP_PROD_PORT_TARGET:-9001}" + + postgres: + image: postgres:15-alpine + # Pass config parameters to the mysql server. + # Find more information below when you need to generate the ssl-relevant file your self + environment: + POSTGRES_DB: ${DOCKER_COMPOSE_POSTGRES_PROD_ENV_POSTGRES_DATABASE:?} + POSTGRES_PASSWORD: ${DOCKER_COMPOSE_POSTGRES_PROD_ENV_POSTGRES_PASSWORD:?} + POSTGRES_PORT: ${DOCKER_COMPOSE_POSTGRES_PROD_ENV_POSTGRES_PORT:-5432} + POSTGRES_USER: ${DOCKER_COMPOSE_POSTGRES_PROD_ENV_POSTGRES_USER:?} + 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/pgdata + +volumes: + postgres_data: + plugins: + etherpad-var: \ No newline at end of file