working on recipe
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
TYPE=lasuite-docs
|
TYPE=lasuite-drive
|
||||||
|
|
||||||
DOMAIN=lasuite-docs.example.com
|
DOMAIN=lasuite-drive.example.com
|
||||||
|
|
||||||
## Domain aliases
|
## Domain aliases
|
||||||
#EXTRA_DOMAINS=', `www.lasuite-docs.example.com`'
|
#EXTRA_DOMAINS=', `www.lasuite-docs.example.com`'
|
||||||
|
|||||||
121
compose.yml
121
compose.yml
@ -69,22 +69,19 @@ x-postgres-env: &postgres-env
|
|||||||
DB_PORT: 5432
|
DB_PORT: 5432
|
||||||
# DB_PASSWORD supplied via secrets (this is same as POSTGRES_PASSWORD)
|
# 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
|
x-minio-env: &minio-env
|
||||||
MINIO_ROOT_USER_FILE: /run/secrets/minio_ru
|
MINIO_ROOT_USER_FILE: /run/secrets/minio_ru
|
||||||
MINIO_ROOT_PASSWORD_FILE: /run/secrets/minio_rp
|
MINIO_ROOT_PASSWORD_FILE: /run/secrets/minio_rp
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
app:
|
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:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
deploy:
|
deploy:
|
||||||
@ -92,7 +89,6 @@ services:
|
|||||||
- "traefik.enable=false"
|
- "traefik.enable=false"
|
||||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
||||||
- "coop-cloud.${STACK_NAME}.version=0.2.4+v4.0.0"
|
- "coop-cloud.${STACK_NAME}.version=0.2.4+v4.0.0"
|
||||||
user: "${DOCKER_USER:-1000}"
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8080"]
|
test: ["CMD", "curl", "-f", "http://localhost:8080"]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
@ -101,20 +97,18 @@ services:
|
|||||||
start_period: 10s
|
start_period: 10s
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
image: lasuite/impress-backend:v4.0.0
|
user: ${DOCKER_USER:-1000}
|
||||||
networks:
|
image: drive:backend-development
|
||||||
- backend
|
|
||||||
environment:
|
environment:
|
||||||
<<: [*common-env, *postgres-env, *yprovider-env]
|
- PYLINTHOME=/app/.pylint.d
|
||||||
healthcheck:
|
- DJANGO_CONFIGURATION=Development
|
||||||
test: ["CMD", "/abra-entrypoint.sh", "python", "manage.py", "check"]
|
<<: [ *common-env, *postgres-env ]
|
||||||
interval: 15s
|
# volumes:
|
||||||
timeout: 30s
|
# - ./src/backend:/app
|
||||||
retries: 20
|
# - ./data/static:/data/static
|
||||||
start_period: 10s
|
# - /app/.venv
|
||||||
user: "${DOCKER_USER:-1000}"
|
networks:
|
||||||
command: ["gunicorn", "-c", "/usr/local/etc/gunicorn/impress.py", "impress.wsgi:application"]
|
- backend
|
||||||
entrypoint: ["/abra-entrypoint.sh", "/usr/local/bin/entrypoint"]
|
|
||||||
configs:
|
configs:
|
||||||
- source: abra_entrypoint
|
- source: abra_entrypoint
|
||||||
target: /abra-entrypoint.sh
|
target: /abra-entrypoint.sh
|
||||||
@ -131,14 +125,19 @@ services:
|
|||||||
- email_pass
|
- email_pass
|
||||||
|
|
||||||
celery:
|
celery:
|
||||||
image: lasuite/impress-backend:v4.0.0
|
user: ${DOCKER_USER:-1000}
|
||||||
|
image: drive:backend-development
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- default
|
||||||
user: "${DOCKER_USER:-1000}"
|
- lasuite
|
||||||
command: ["celery", "-A", "impress.celery_app", "worker", "-l", "INFO"]
|
command: [ "celery", "-A", "drive.celery_app", "worker", "-l", "INFO" ]
|
||||||
environment:
|
environment:
|
||||||
<<: [*common-env, *postgres-env, *yprovider-env]
|
- DJANGO_CONFIGURATION=Development
|
||||||
entrypoint: ["/abra-entrypoint.sh", "/usr/local/bin/entrypoint"]
|
<<: [*common-env, *postgres-env]
|
||||||
|
# volumes:
|
||||||
|
# - ./src/backend:/app
|
||||||
|
# - ./data/static:/data/static
|
||||||
|
# - /app/.venv
|
||||||
configs:
|
configs:
|
||||||
- source: abra_entrypoint
|
- source: abra_entrypoint
|
||||||
target: /abra-entrypoint.sh
|
target: /abra-entrypoint.sh
|
||||||
@ -153,20 +152,6 @@ services:
|
|||||||
- y_api_key
|
- y_api_key
|
||||||
- email_pass
|
- 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:
|
db:
|
||||||
image: postgres:16
|
image: postgres:16
|
||||||
networks:
|
networks:
|
||||||
@ -195,24 +180,53 @@ services:
|
|||||||
- postgres_p
|
- postgres_p
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:8
|
image: redis:5
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
minio-bootstrap:
|
mailcatcher:
|
||||||
# NOTE: Not started by default, only run with a manual `abra app restart` / `docker service scale`
|
image: sj26/mailcatcher:latest
|
||||||
image: minio/mc:RELEASE.2025-05-21T01-59-54Z
|
|
||||||
environment: *minio-env
|
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- 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: >
|
entrypoint: >
|
||||||
sh -c "
|
sh -c "
|
||||||
MINIO_ROOT_USER=\"\$$(cat /run/secrets/minio_ru)\" &&
|
MINIO_ROOT_USER=\"\$$(cat /run/secrets/minio_ru)\" &&
|
||||||
MINIO_ROOT_PASSWORD=\"\$$(cat /run/secrets/minio_rp)\" &&
|
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 alias set drive http://minio:9000 \$${MINIO_ROOT_USER} \"\$${MINIO_ROOT_PASSWORD}\" && \
|
||||||
/usr/bin/mc mb --ignore-existing docs/docs-media-storage &&
|
/usr/bin/mc mb drive/drive-media-storage && \
|
||||||
/usr/bin/mc version enable docs/docs-media-storage &&
|
/usr/bin/mc version enable drive/drive-media-storage && \
|
||||||
exit 0"
|
exit 0;"
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
replicas: 0
|
replicas: 0
|
||||||
@ -224,6 +238,7 @@ services:
|
|||||||
|
|
||||||
minio:
|
minio:
|
||||||
image: minio/minio:RELEASE.2025-05-24T17-08-30Z
|
image: minio/minio:RELEASE.2025-05-24T17-08-30Z
|
||||||
|
user: ${DOCKER_USER:-1000}
|
||||||
environment: *minio-env
|
environment: *minio-env
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "mc", "ready", "local"]
|
test: ["CMD", "mc", "ready", "local"]
|
||||||
|
|||||||
Reference in New Issue
Block a user