working with abra recipe lint
This commit is contained in:
25
.env.sample
25
.env.sample
@ -10,16 +10,21 @@ LETS_ENCRYPT_ENV=production
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
# SECRETS
|
# SECRETS
|
||||||
##############################################################################
|
##############################################################################
|
||||||
SECRET_DJANGO_SECRET_KEY_VERSION=v1
|
# abbreviations are to fit abra 12 char secret recommendation
|
||||||
SECRET_OIDC_RP_CLIENT_SECRET_VERSION=v1
|
# DJANGO_SECRET_KEY
|
||||||
SECRET_DJANGO_SUPERUSER_PASSWORD_VERSION=v1
|
SECRET_DJANGO_SK_VERSION=v1
|
||||||
SECRET_MINIO_ROOT_PASSWORD_VERSION=v1
|
# ODIC_RP_CLIENT_SECRET
|
||||||
SECRET_COLLABORATION_SERVER_SECRET_VERSION=v1
|
SECRET_OIDC_RPCS_VERSION=v1
|
||||||
SECRET_POSTGRES_PASSWORD_VERSION=v1
|
# DJANGO_SUPERUSER_PASSWORD
|
||||||
SECRET_DB_PASSWORD_VERSION=v1
|
SECRET_DJANGO_SP_VERSION=v1
|
||||||
|
# MINIO_ROOT_PASSWORD
|
||||||
MINIO_ROOT_PASSWORD_FILE="/run/secrets/minio_pass"
|
SECRET_MINIO_RP_VERSION=v1
|
||||||
POSTGRES_PASSWORD_FILE="/run/secrets/postgres_pass"
|
# COLLABORATION_SERVER_SECRET
|
||||||
|
SECRET_COLLAB_SS_VERSION=v1
|
||||||
|
# POSTGRES_PASSWORD
|
||||||
|
SECRET_POSTGRES_P_VERSION=v1
|
||||||
|
# Y_PROVIDER_API_KEY
|
||||||
|
SECRET_Y_API_KEY_VERSION=v1
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# EMAIL
|
# EMAIL
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
[ -f /run/secrets/postgres_password ] && export DB_PASSWORD="$(cat /run/secrets/postgres_password)"
|
[ -f /run/secrets/postgres_p ] && export DB_PASSWORD="$(cat /run/secrets/postgres_p)"
|
||||||
#[ -f /run/secrets/postgres_password ] && export POSTGRES_PASSWORD="$(cat /run/secrets/postgres_password)"
|
[ -f /run/secrets/django_sk ] && export DJANGO_SECRET_KEY="$(cat /run/secrets/django_sk)"
|
||||||
[ -f /run/secrets/django_secret_key ] && export DJANGO_SECRET_KEY="$(cat /run/secrets/django_secret_key)"
|
[ -f /run/secrets/minio_rp ] && export MINIO_ROOT_PASSWORD="$(cat /run/secrets/minio_rp)"
|
||||||
[ -f /run/secrets/minio_root_password ] && export MINIO_ROOT_PASSWORD="$(cat /run/secrets/minio_root_password)"
|
[ -f /run/secrets/minio_rp ] && export AWS_S3_SECRET_ACCESS_KEY="$(cat /run/secrets/minio_rp)"
|
||||||
[ -f /run/secrets/minio_root_password ] && export AWS_S3_SECRET_ACCESS_KEY="$(cat /run/secrets/minio_root_password)"
|
[ -f /run/secrets/django_sp ] && export DJANGO_SUPERUSER_PASSWORD="$(cat /run/secrets/django_sp)"
|
||||||
[ -f /run/secrets/django_superuser_password ] && export DJANGO_SUPERUSER_PASSWORD="$(cat /run/secrets/django_superuser_password)"
|
[ -f /run/secrets/oidc_rpcs ] && export OIDC_RP_CLIENT_SECRET="$(cat /run/secrets/oidc_rpcs)"
|
||||||
[ -f /run/secrets/oidc_rp_client_secret ] && export OIDC_RP_CLIENT_SECRET="$(cat /run/secrets/oidc_rp_client_secret)"
|
[ -f /run/secrets/collab_ss ] && export COLLABORATION_SERVER_SECRET="$(cat /run/secrets/collab_ss)"
|
||||||
[ -f /run/secrets/collaboration_server_secret ] && export COLLABORATION_SERVER_SECRET="$(cat /run/secrets/collaboration_server_secret)"
|
[ -f /run/secrets/y_api_key ] && export Y_PROVIDER_API_KEY="$(cat /run/secrets/y_api_key)"
|
||||||
|
|
||||||
# if not in "env" mode, then execute the original entrypoint and command
|
# if not in "env" mode, then execute the original entrypoint and command
|
||||||
if [ ! "$1" = "-e" ]; then
|
if [ ! "$1" = "-e" ]; then
|
||||||
|
|||||||
101
compose.yml
101
compose.yml
@ -57,7 +57,7 @@ x-postgres-env: &postgres-env
|
|||||||
# Postgresql db container configuration
|
# Postgresql db container configuration
|
||||||
POSTGRES_DB: docs
|
POSTGRES_DB: docs
|
||||||
POSTGRES_USER: docs
|
POSTGRES_USER: docs
|
||||||
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
|
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_p
|
||||||
# App database configuration
|
# App database configuration
|
||||||
DB_HOST: db
|
DB_HOST: db
|
||||||
DB_NAME: docs
|
DB_NAME: docs
|
||||||
@ -67,8 +67,7 @@ x-postgres-env: &postgres-env
|
|||||||
|
|
||||||
x-yprovider-env: &yprovider-env
|
x-yprovider-env: &yprovider-env
|
||||||
COLLABORATION_LOGGING: "true"
|
COLLABORATION_LOGGING: "true"
|
||||||
# FIXME: Move to docker secret
|
# Y_PROVIDER_API_KEY supplied via secrets
|
||||||
Y_PROVIDER_API_KEY: foobar
|
|
||||||
COLLABORATION_API_URL: http://y-provider:4444/api/
|
COLLABORATION_API_URL: http://y-provider:4444/api/
|
||||||
COLLABORATION_SERVER_ORIGIN: https://${DOMAIN}
|
COLLABORATION_SERVER_ORIGIN: https://${DOMAIN}
|
||||||
# COLLABORATION_SERVER_SECRET supplied via secrets
|
# COLLABORATION_SERVER_SECRET supplied via secrets
|
||||||
@ -77,7 +76,7 @@ x-yprovider-env: &yprovider-env
|
|||||||
|
|
||||||
x-minio-env: &minio-env
|
x-minio-env: &minio-env
|
||||||
MINIO_ROOT_USER: user
|
MINIO_ROOT_USER: user
|
||||||
# MINIO_ROOT_PASSWORD supplied via secrets
|
MINIO_ROOT_PASSWORD_FILE: /run/secrets/minio_rp
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
@ -115,12 +114,13 @@ services:
|
|||||||
target: /abra-entrypoint.sh
|
target: /abra-entrypoint.sh
|
||||||
mode: 0555
|
mode: 0555
|
||||||
secrets:
|
secrets:
|
||||||
- django_secret_key
|
- django_sk
|
||||||
- oidc_rp_client_secret
|
- django_sp
|
||||||
- django_superuser_password
|
- oidc_rpcs
|
||||||
- collaboration_server_secret
|
- collab_ss
|
||||||
- minio_root_password
|
- minio_rp
|
||||||
- postgres_password
|
- postgres_p
|
||||||
|
- y_api_key
|
||||||
|
|
||||||
celery:
|
celery:
|
||||||
image: lasuite/impress-backend:v3.4.2
|
image: lasuite/impress-backend:v3.4.2
|
||||||
@ -135,12 +135,13 @@ services:
|
|||||||
target: /abra-entrypoint.sh
|
target: /abra-entrypoint.sh
|
||||||
mode: 0555
|
mode: 0555
|
||||||
secrets:
|
secrets:
|
||||||
- django_secret_key
|
- django_sk
|
||||||
- oidc_rp_client_secret
|
- django_sp
|
||||||
- django_superuser_password
|
- oidc_rpcs
|
||||||
- collaboration_server_secret
|
- collab_ss
|
||||||
- minio_root_password
|
- minio_rp
|
||||||
- postgres_password
|
- postgres_p
|
||||||
|
- y_api_key
|
||||||
|
|
||||||
|
|
||||||
y-provider:
|
y-provider:
|
||||||
@ -156,12 +157,13 @@ services:
|
|||||||
mode: 0555
|
mode: 0555
|
||||||
# NOTE: healthcheck - `wget` is available in the container, but `wget http://localhost:4444` gives a 403
|
# NOTE: healthcheck - `wget` is available in the container, but `wget http://localhost:4444` gives a 403
|
||||||
secrets:
|
secrets:
|
||||||
- django_secret_key
|
- django_sk
|
||||||
- oidc_rp_client_secret
|
- django_sp
|
||||||
- django_superuser_password
|
- oidc_rpcs
|
||||||
- collaboration_server_secret
|
- collab_ss
|
||||||
- minio_root_password
|
- minio_rp
|
||||||
- postgres_password
|
- postgres_p
|
||||||
|
- y_api_key
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:16
|
image: postgres:16
|
||||||
@ -193,12 +195,12 @@ services:
|
|||||||
target: /abra-entrypoint.sh
|
target: /abra-entrypoint.sh
|
||||||
mode: 0555
|
mode: 0555
|
||||||
secrets:
|
secrets:
|
||||||
- django_secret_key
|
- django_sk
|
||||||
- oidc_rp_client_secret
|
- django_sp
|
||||||
- django_superuser_password
|
- oidc_rpcs
|
||||||
- collaboration_server_secret
|
- collab_ss
|
||||||
- minio_root_password
|
- minio_rp
|
||||||
- postgres_password
|
- postgres_p
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:8
|
image: redis:8
|
||||||
@ -213,7 +215,7 @@ services:
|
|||||||
- backend
|
- backend
|
||||||
# entrypoint: ["/abra-entrypoint.sh"]
|
# entrypoint: ["/abra-entrypoint.sh"]
|
||||||
entrypoint: >
|
entrypoint: >
|
||||||
sh -c "MINIO_ROOT_PASSWORD=\"\$$(cat /run/secrets/minio_root_password)\" &&
|
sh -c "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 docs http://minio:9000 \$${MINIO_ROOT_USER} \"\$${MINIO_ROOT_PASSWORD}\" &&
|
||||||
/usr/bin/mc mb --ignore-existing docs/docs-media-storage &&
|
/usr/bin/mc mb --ignore-existing docs/docs-media-storage &&
|
||||||
/usr/bin/mc version enable docs/docs-media-storage &&
|
/usr/bin/mc version enable docs/docs-media-storage &&
|
||||||
@ -224,12 +226,7 @@ services:
|
|||||||
restart_policy:
|
restart_policy:
|
||||||
condition: none
|
condition: none
|
||||||
secrets:
|
secrets:
|
||||||
- django_secret_key
|
- minio_rp
|
||||||
- oidc_rp_client_secret
|
|
||||||
- django_superuser_password
|
|
||||||
- collaboration_server_secret
|
|
||||||
- minio_root_password
|
|
||||||
- postgres_password
|
|
||||||
|
|
||||||
minio:
|
minio:
|
||||||
image: minio/minio:RELEASE.2025-05-24T17-08-30Z
|
image: minio/minio:RELEASE.2025-05-24T17-08-30Z
|
||||||
@ -254,12 +251,7 @@ services:
|
|||||||
target: /abra-entrypoint.sh
|
target: /abra-entrypoint.sh
|
||||||
mode: 0555
|
mode: 0555
|
||||||
secrets:
|
secrets:
|
||||||
- django_secret_key
|
- minio_rp
|
||||||
- oidc_rp_client_secret
|
|
||||||
- django_superuser_password
|
|
||||||
- collaboration_server_secret
|
|
||||||
- minio_root_password
|
|
||||||
- postgres_password
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: nginx:1.29
|
image: nginx:1.29
|
||||||
@ -303,21 +295,24 @@ configs:
|
|||||||
file: abra-entrypoint.sh
|
file: abra-entrypoint.sh
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
django_secret_key:
|
django_sk:
|
||||||
external: true
|
external: true
|
||||||
name: ${STACK_NAME}_django_secret_key_${SECRET_DJANGO_SECRET_KEY_VERSION}
|
name: ${STACK_NAME}_django_sk_${SECRET_DJANGO_SK_VERSION}
|
||||||
oidc_rp_client_secret:
|
oidc_rpcs:
|
||||||
external: true
|
external: true
|
||||||
name: ${STACK_NAME}_oidc_rp_client_secret_${SECRET_OIDC_RP_CLIENT_SECRET_VERSION}
|
name: ${STACK_NAME}_oidc_rpcs_${SECRET_OIDC_RPCS_VERSION}
|
||||||
django_superuser_password:
|
django_sp:
|
||||||
external: true
|
external: true
|
||||||
name: ${STACK_NAME}_django_superuser_password_${SECRET_DJANGO_SUPERUSER_PASSWORD_VERSION}
|
name: ${STACK_NAME}_django_sp_${SECRET_DJANGO_SP_VERSION}
|
||||||
postgres_password:
|
postgres_p:
|
||||||
external: true
|
external: true
|
||||||
name: ${STACK_NAME}_postgres_password_${SECRET_POSTGRES_PASSWORD_VERSION}
|
name: ${STACK_NAME}_postgres_p_${SECRET_POSTGRES_P_VERSION}
|
||||||
collaboration_server_secret:
|
collab_ss:
|
||||||
external: true
|
external: true
|
||||||
name: ${STACK_NAME}_collaboration_server_secret_${SECRET_COLLABORATION_SERVER_SECRET_VERSION}
|
name: ${STACK_NAME}_collab_ss_${SECRET_COLLAB_SS_VERSION}
|
||||||
minio_root_password:
|
minio_rp:
|
||||||
external: true
|
external: true
|
||||||
name: ${STACK_NAME}_minio_root_password_${SECRET_MINIO_ROOT_PASSWORD_VERSION}
|
name: ${STACK_NAME}_minio_rp_${SECRET_MINIO_RP_VERSION}
|
||||||
|
y_api_key:
|
||||||
|
external: true
|
||||||
|
name: ${STACK_NAME}_y_api_key_${SECRET_Y_API_KEY_VERSION}
|
||||||
Reference in New Issue
Block a user