diff --git a/abra-entrypoint.sh b/abra-entrypoint.sh index 0022567..470e0dd 100644 --- a/abra-entrypoint.sh +++ b/abra-entrypoint.sh @@ -12,8 +12,6 @@ set -e [ -f /run/secrets/email_pass ] && export DJANGO_EMAIL_HOST_PASSWORD="$(cat /run/secrets/email_pass)" # if not in "env" mode, then execute the original entrypoint and command -echo "++ new entrypoint!" -echo "++ cmd: $@" if [ ! "$1" = "-e" ]; then exec "$@" fi \ No newline at end of file diff --git a/compose.yml b/compose.yml index daf677e..599fa7a 100644 --- a/compose.yml +++ b/compose.yml @@ -55,6 +55,9 @@ x-common-env: &common-env AI_MODEL: llama # Collaboration COLLABORATION_API_URL: https://$DOMAIN/collaboration/api/ + # docker username + USER_NAME: "dockeruser" + HOME: "/home/dockeruser" x-postgres-env: &postgres-env # Postgresql db container configuration @@ -91,12 +94,13 @@ services: - "traefik.enable=false" - "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}" - "coop-cloud.${STACK_NAME}.version=0.2.2+v3.4.2" -# healthcheck: -# test: ["CMD", "curl", "-f", "http://localhost:8080"] -# interval: 15s -# timeout: 30s -# retries: 20 -# start_period: 10s + user: "${DOCKER_USER:-1000}" + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080"] + interval: 15s + timeout: 30s + retries: 20 + start_period: 10s backend: image: lasuite/impress-backend:v4.0.0 @@ -104,18 +108,13 @@ services: - backend 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 -# healthcheck: -# test: ["CMD-SHELL", "/abra-entrypoint.sh", "/usr/local/bin/entrypoint", "python", "manage.py", "check"] -# interval: 15s -# timeout: 30s -# retries: 20 -# start_period: 10s + 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"] configs: @@ -136,7 +135,8 @@ services: celery: image: lasuite/impress-backend:v4.0.0 networks: - - backend + - backend + user: "${DOCKER_USER:-1000}" command: ["celery", "-A", "impress.celery_app", "worker", "-l", "INFO"] environment: <<: [*common-env, *postgres-env, *yprovider-env] @@ -157,10 +157,11 @@ services: y-provider: - image: lasuite/impress-y-provider:v3.4.2 + 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"] @@ -232,7 +233,7 @@ services: timeout: 20s retries: 300 networks: - - backend + - backend command: minio server /data entrypoint: ["/usr/bin/docker-entrypoint.sh"] volumes: