working on recipe

This commit is contained in:
2025-12-18 15:30:20 -05:00
parent 9c5f767cb8
commit 5ab7f0d499
3 changed files with 71 additions and 55 deletions

View File

@ -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`'

View File

@ -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"]

1
todo.txt Normal file
View File

@ -0,0 +1 @@
- should collabora and onlyoffice be part of the recipe ... or linked ?