Skip to content

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

@AntoLC AntoLC requested a review from lunika July 18, 2025 09:12
@@ -0,0 +1,114 @@
# ERB templated nginx configuration
Copy link
Member

Choose a reason for hiding this comment

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

This file is a configuration file specific to PAAS deployment. I think it should not be in the src directory.

Copy link
Member Author

Choose a reason for hiding this comment

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

We also have helm charts in src/ so I figured it was a good place for it... Where else would you put it?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe you can create a build or deploy directory at the root project ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@lunika a deploy directory would make sense IMHO, could we also move files currently in docker in there?

@virgile-dev
Copy link
Collaborator

Hey @sylvinus !
Thanks for contributing this.
Yesterday I added a way to document alternative methods to deploy docs : https://github.com/suitenumerique/docs/pull/1292/files
When it gets merged it can be nice to add this one to the documentation docs/installation/README.md
We could add a section ## called PAAS that points to your changes.
It would also be nice to see the Scalingo guys adding Docs to the market place so that we can add them along side Clever Cloud. I'll ping them.

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.

4 participants