Skip to content

✨(buildpack) add PaaS deployment support, tested with Scalingo #1020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sylvinus
Copy link
Member

@sylvinus sylvinus commented Jun 1, 2025

This PR adds a new deployment option for Heroku-like platforms based on buildpacks, like Scalingo.

To deploy there, create a new app on one of these platforms, configure Postgres and Redis addons, and then add these configuration variables:

AWS_S3_ACCESS_KEY_ID=xxx-secret
AWS_S3_ENDPOINT_URL=https://s3.fr-par.scw.cloud
AWS_S3_REGION_NAME=fr-par
AWS_S3_SECRET_ACCESS_KEY=xxx-secret
AWS_STORAGE_BUCKET_NAME=xxx-bucket-name
BUILDPACK_URL=https://github.com/suitenumerique/buildpack#main
COLLABORATION_API_URL=http://localhost:4444/
COLLABORATION_SERVER_SECRET=xxx-collaboration-secret
DATABASE_URL=xxx-postgres-url
DATA_DIR=/app/data
DJANGO_ALLOWED_HOSTS=xxx-hostname
DJANGO_CONFIGURATION=Production
DJANGO_SECRET_KEY=xxx-django-secret
DJANGO_SETTINGS_MODULE=impress.settings
DJANGO_STATIC_ROOT=/app/static_app/
FRONTEND_THEME=dsfr
LASUITE_BACKEND_DIR=.
LASUITE_NGINX_DIR=./
LASUITE_SCRIPT_POSTCOMPILE=bin/buildpack_postcompile.sh
LASUITE_SCRIPT_POSTFRONTEND=bin/buildpack_postfrontend.sh
LOGIN_REDIRECT_URL=/
LOGIN_REDIRECT_URL_FAILURE=/
LOGOUT_REDIRECT_URL=/
MEDIA_BASE_URL=xxx-https-url
NEXT_PUBLIC_SW_DEACTIVATED=true
OIDC_OP_AUTHORIZATION_ENDPOINT=https://docs-hwenen.us1.zitadel.cloud/oauth/v2/authorize
OIDC_OP_JWKS_ENDPOINT=https://docs-hwenen.us1.zitadel.cloud/oauth/v2/keys
OIDC_OP_TOKEN_ENDPOINT=https://docs-hwenen.us1.zitadel.cloud/oauth/v2/token
OIDC_OP_USER_ENDPOINT=https://docs-hwenen.us1.zitadel.cloud/oidc/v1/userinfo
OIDC_RP_CLIENT_ID=xxx-oidc-id
OIDC_RP_CLIENT_SECRET=xxx-oidc-secret
REDIS_URL=xxx-redis-url
Y_PROVIDER_API_BASE_URL=http://localhost:4444/api/
Y_PROVIDER_API_KEY=xxx-yprovider-api-key

(Note that I'm using Scaleway's object storage and Zitadel's OIDC provider, you are free to use other services)

I'm still debugging a websocket issue but this should mostly work, testers welcome!

A few interesting links:

gunicorn -b :8000 impress.wsgi:application --log-file - &

# Start the Y provider service
cd src/frontend/servers/y-provider && PORT=4444 ../../.scalingo/node/bin/node dist/start-server.js &
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: we should not hardcode the node binary path here.

@sylvinus
Copy link
Member Author

sylvinus commented Jun 5, 2025

FYI the same support was merged in Drive: suitenumerique/drive@dd6f0be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants