Compare commits
5 Commits
minio_root
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 16c68c085b | |||
| b6f601ca24 | |||
| 00b0c2e64e | |||
| d82844ba59 | |||
| b527d802ca |
@ -27,6 +27,8 @@ SECRET_COLLAB_SS_VERSION=v1
|
||||
SECRET_POSTGRES_P_VERSION=v1
|
||||
# Y_PROVIDER_API_KEY
|
||||
SECRET_Y_API_KEY_VERSION=v1
|
||||
# DJANGO_HOST_EMAIL_PASSWORD
|
||||
SECRET_EMAIL_PASS_VERSION=v1
|
||||
|
||||
##############################################################################
|
||||
# EMAIL
|
||||
@ -35,6 +37,9 @@ DJANGO_EMAIL_BRAND_NAME="La Suite Numérique"
|
||||
DJANGO_EMAIL_HOST="mail.example.com"
|
||||
DJANGO_EMAIL_LOGO_IMG="http://$DOMAIN/assets/logo-suite-numerique.png"
|
||||
DJANGO_EMAIL_PORT=1025
|
||||
DJANGO_EMAIL_USE_SSL=True
|
||||
DJANGO_EMAIL_USE_TLS=False
|
||||
DJANGO_EMAIL_FROM=mail@example.com
|
||||
|
||||
##############################################################################
|
||||
# SINGLE SIGN ON
|
||||
|
||||
@ -3,21 +3,15 @@ set -e
|
||||
|
||||
[ -f /run/secrets/postgres_p ] && export DB_PASSWORD="$(cat /run/secrets/postgres_p)"
|
||||
[ -f /run/secrets/django_sk ] && export DJANGO_SECRET_KEY="$(cat /run/secrets/django_sk)"
|
||||
#[ -f /run/secrets/minio_rp ] && export MINIO_ROOT_PASSWORD="$(cat /run/secrets/minio_rp)"
|
||||
[ -f /run/secrets/minio_rp ] && export AWS_S3_SECRET_ACCESS_KEY="$(cat /run/secrets/minio_rp)"
|
||||
[ -f /run/secrets/minio_ru ] && export AWS_S3_ACCESS_KEY_ID="$(cat /run/secrets/minio_ru)"
|
||||
[ -f /run/secrets/django_sp ] && export DJANGO_SUPERUSER_PASSWORD="$(cat /run/secrets/django_sp)"
|
||||
[ -f /run/secrets/oidc_rpcs ] && export OIDC_RP_CLIENT_SECRET="$(cat /run/secrets/oidc_rpcs)"
|
||||
[ -f /run/secrets/collab_ss ] && export COLLABORATION_SERVER_SECRET="$(cat /run/secrets/collab_ss)"
|
||||
[ -f /run/secrets/y_api_key ] && export Y_PROVIDER_API_KEY="$(cat /run/secrets/y_api_key)"
|
||||
[ -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
|
||||
if [ ! "$1" = "-e" ]; then
|
||||
ORIGINAL_ENTRYPOINT="$1"
|
||||
shift
|
||||
if [ -n "$ORIGINAL_ENTRYPOINT" ] && [ "$ORIGINAL_ENTRYPOINT" != "null" ]; then
|
||||
exec "$ORIGINAL_ENTRYPOINT" "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
exec "$@"
|
||||
fi
|
||||
29
compose.yml
29
compose.yml
@ -21,7 +21,10 @@ x-common-env: &common-env
|
||||
DJANGO_EMAIL_LOGO_IMG:
|
||||
DJANGO_EMAIL_PORT:
|
||||
DJANGO_EMAIL_HOST_USER:
|
||||
DJANGO_EMAIL_HOST_PASSWORD:
|
||||
# DJANGO_EMAIL_HOST_PASSWORD supplied via secret
|
||||
DJANGO_EMAIL_USE_SSL:
|
||||
DJANGO_EMAIL_USE_TLS:
|
||||
DJANGO_EMAIL_FROM:
|
||||
# Backend url
|
||||
IMPRESS_BASE_URL: "https://${DOMAIN}"
|
||||
# Media
|
||||
@ -119,8 +122,10 @@ services:
|
||||
- oidc_rpcs
|
||||
- collab_ss
|
||||
- minio_rp
|
||||
- minio_ru
|
||||
- postgres_p
|
||||
- y_api_key
|
||||
- email_pass
|
||||
|
||||
celery:
|
||||
image: lasuite/impress-backend:v3.4.2
|
||||
@ -142,6 +147,7 @@ services:
|
||||
- minio_rp
|
||||
- postgres_p
|
||||
- y_api_key
|
||||
- email_pass
|
||||
|
||||
|
||||
y-provider:
|
||||
@ -149,20 +155,11 @@ services:
|
||||
networks:
|
||||
- backend
|
||||
environment: *yprovider-env
|
||||
entrypoint: >
|
||||
sh -c "export Y_PROVIDER_API_KEY=\"$$(cat /run/secrets/y_api_key)\" && exec /usr/local/bin/entrypoint \"$$@\"" --
|
||||
command: ["yarn", "start"]
|
||||
entrypoint: ["/abra-entrypoint.sh", "/usr/local/bin/entrypoint"]
|
||||
configs:
|
||||
- source: abra_entrypoint
|
||||
target: /abra-entrypoint.sh
|
||||
mode: 0555
|
||||
# NOTE: healthcheck - `wget` is available in the container, but `wget http://localhost:4444` gives a 403
|
||||
secrets:
|
||||
- django_sk
|
||||
- django_sp
|
||||
- oidc_rpcs
|
||||
- collab_ss
|
||||
- minio_rp
|
||||
- postgres_p
|
||||
- y_api_key
|
||||
|
||||
db:
|
||||
@ -231,7 +228,7 @@ services:
|
||||
networks:
|
||||
- backend
|
||||
command: minio server /data
|
||||
entrypoint: ["/abra-entrypoint.sh", "/usr/bin/docker-entrypoint.sh"]
|
||||
entrypoint: ["/usr/bin/docker-entrypoint.sh"]
|
||||
volumes:
|
||||
- minio:/data
|
||||
deploy:
|
||||
@ -254,6 +251,9 @@ services:
|
||||
networks:
|
||||
proxy:
|
||||
backend:
|
||||
depends_on:
|
||||
- backend
|
||||
- app
|
||||
environment:
|
||||
- STACK_NAME
|
||||
deploy:
|
||||
@ -312,3 +312,6 @@ secrets:
|
||||
y_api_key:
|
||||
external: true
|
||||
name: ${STACK_NAME}_y_api_key_${SECRET_Y_API_KEY_VERSION}
|
||||
email_pass:
|
||||
external: true
|
||||
name: ${STACK_NAME}_email_pass_${SECRET_EMAIL_PASS_VERSION}
|
||||
Reference in New Issue
Block a user