From 5ab7f0d4995ac2f32406a2ea6326bebb428f85f7 Mon Sep 17 00:00:00 2001 From: notplants Date: Thu, 18 Dec 2025 15:30:20 -0500 Subject: [PATCH] working on recipe --- .env.sample | 4 +- compose.yml | 121 +++++++++++++++++++++++++++++----------------------- todo.txt | 1 + 3 files changed, 71 insertions(+), 55 deletions(-) create mode 100644 todo.txt diff --git a/.env.sample b/.env.sample index 9db8257..35e1670 100644 --- a/.env.sample +++ b/.env.sample @@ -1,6 +1,6 @@ -TYPE=lasuite-docs +TYPE=lasuite-drive -DOMAIN=lasuite-docs.example.com +DOMAIN=lasuite-drive.example.com ## Domain aliases #EXTRA_DOMAINS=', `www.lasuite-docs.example.com`' diff --git a/compose.yml b/compose.yml index 8539cbe..25e8c5d 100644 --- a/compose.yml +++ b/compose.yml @@ -69,22 +69,19 @@ x-postgres-env: &postgres-env DB_PORT: 5432 # DB_PASSWORD supplied via secrets (this is same as POSTGRES_PASSWORD) -x-yprovider-env: &yprovider-env - COLLABORATION_LOGGING: "true" - # Y_PROVIDER_API_KEY supplied via secrets - COLLABORATION_API_URL: http://y-provider:4444/api/ - COLLABORATION_SERVER_ORIGIN: https://${DOMAIN} - # COLLABORATION_SERVER_SECRET supplied via secrets - COLLABORATION_BACKEND_BASE_URL: https://${DOMAIN} - COLLABORATION_WS_URL: wss://${DOMAIN}/collaboration/ws/ - x-minio-env: &minio-env MINIO_ROOT_USER_FILE: /run/secrets/minio_ru MINIO_ROOT_PASSWORD_FILE: /run/secrets/minio_rp services: + app: - image: lasuite/impress-frontend:v4.0.0 + user: "${DOCKER_USER:-1000}" + image: drive:frontend-development + volumes: + - ./src/frontend/:/home/frontend/ + - /home/frontend/node_modules + - /home/frontend/apps/drive/node_modules networks: - backend deploy: @@ -92,7 +89,6 @@ services: - "traefik.enable=false" - "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}" - "coop-cloud.${STACK_NAME}.version=0.2.4+v4.0.0" - user: "${DOCKER_USER:-1000}" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080"] interval: 15s @@ -101,20 +97,18 @@ services: start_period: 10s backend: - image: lasuite/impress-backend:v4.0.0 - networks: - - backend + user: ${DOCKER_USER:-1000} + image: drive:backend-development environment: - <<: [*common-env, *postgres-env, *yprovider-env] - healthcheck: - test: ["CMD", "/abra-entrypoint.sh", "python", "manage.py", "check"] - interval: 15s - timeout: 30s - retries: 20 - start_period: 10s - user: "${DOCKER_USER:-1000}" - command: ["gunicorn", "-c", "/usr/local/etc/gunicorn/impress.py", "impress.wsgi:application"] - entrypoint: ["/abra-entrypoint.sh", "/usr/local/bin/entrypoint"] + - PYLINTHOME=/app/.pylint.d + - DJANGO_CONFIGURATION=Development + <<: [ *common-env, *postgres-env ] +# volumes: +# - ./src/backend:/app +# - ./data/static:/data/static +# - /app/.venv + networks: + - backend configs: - source: abra_entrypoint target: /abra-entrypoint.sh @@ -131,14 +125,19 @@ services: - email_pass celery: - image: lasuite/impress-backend:v4.0.0 + user: ${DOCKER_USER:-1000} + image: drive:backend-development networks: - - backend - user: "${DOCKER_USER:-1000}" - command: ["celery", "-A", "impress.celery_app", "worker", "-l", "INFO"] + - default + - lasuite + command: [ "celery", "-A", "drive.celery_app", "worker", "-l", "INFO" ] environment: - <<: [*common-env, *postgres-env, *yprovider-env] - entrypoint: ["/abra-entrypoint.sh", "/usr/local/bin/entrypoint"] + - DJANGO_CONFIGURATION=Development + <<: [*common-env, *postgres-env] +# volumes: +# - ./src/backend:/app +# - ./data/static:/data/static +# - /app/.venv configs: - source: abra_entrypoint target: /abra-entrypoint.sh @@ -153,20 +152,6 @@ services: - y_api_key - email_pass - - y-provider: - image: lasuite/impress-y-provider:v4.0.0 - networks: - - backend - environment: *yprovider-env - user: "${DOCKER_USER:-1000}" - entrypoint: > - sh -c "export Y_PROVIDER_API_KEY=\"$$(cat /run/secrets/y_api_key)\" && exec /usr/local/bin/entrypoint \"$$@\"" -- - command: ["yarn", "start"] - # NOTE: healthcheck - `wget` is available in the container, but `wget http://localhost:4444` gives a 403 - secrets: - - y_api_key - db: image: postgres:16 networks: @@ -195,24 +180,53 @@ services: - postgres_p redis: - image: redis:8 + image: redis:5 networks: - backend - minio-bootstrap: - # NOTE: Not started by default, only run with a manual `abra app restart` / `docker service scale` - image: minio/mc:RELEASE.2025-05-21T01-59-54Z - environment: *minio-env + mailcatcher: + image: sj26/mailcatcher:latest networks: - backend + +# TODO: remove this +# minio-bootstrap: +# # NOTE: Not started by default, only run with a manual `abra app restart` / `docker service scale` +# image: minio/mc:RELEASE.2025-05-21T01-59-54Z +# environment: *minio-env +# networks: +# - backend +# entrypoint: > +# sh -c " +# MINIO_ROOT_USER=\"\$$(cat /run/secrets/minio_ru)\" && +# MINIO_ROOT_PASSWORD=\"\$$(cat /run/secrets/minio_rp)\" && +# /usr/bin/mc alias set docs http://minio:9000 \$${MINIO_ROOT_USER} \"\$${MINIO_ROOT_PASSWORD}\" && +# /usr/bin/mc mb --ignore-existing docs/docs-media-storage && +# /usr/bin/mc version enable docs/docs-media-storage && +# exit 0" +# deploy: +# mode: replicated +# replicas: 0 +# restart_policy: +# condition: none +# secrets: +# - minio_rp +# - minio_ru + + createbuckets: + image: minio/mc + depends_on: + minio: + condition: service_healthy + restart: true entrypoint: > sh -c " MINIO_ROOT_USER=\"\$$(cat /run/secrets/minio_ru)\" && MINIO_ROOT_PASSWORD=\"\$$(cat /run/secrets/minio_rp)\" && - /usr/bin/mc alias set docs http://minio:9000 \$${MINIO_ROOT_USER} \"\$${MINIO_ROOT_PASSWORD}\" && - /usr/bin/mc mb --ignore-existing docs/docs-media-storage && - /usr/bin/mc version enable docs/docs-media-storage && - exit 0" + /usr/bin/mc alias set drive http://minio:9000 \$${MINIO_ROOT_USER} \"\$${MINIO_ROOT_PASSWORD}\" && \ + /usr/bin/mc mb drive/drive-media-storage && \ + /usr/bin/mc version enable drive/drive-media-storage && \ + exit 0;" deploy: mode: replicated replicas: 0 @@ -224,6 +238,7 @@ services: minio: image: minio/minio:RELEASE.2025-05-24T17-08-30Z + user: ${DOCKER_USER:-1000} environment: *minio-env healthcheck: test: ["CMD", "mc", "ready", "local"] diff --git a/todo.txt b/todo.txt new file mode 100644 index 0000000..4395867 --- /dev/null +++ b/todo.txt @@ -0,0 +1 @@ +- should collabora and onlyoffice be part of the recipe ... or linked ? \ No newline at end of file