-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
Adds docker compose examples #1113
Conversation
Generally, I like this. Could we parametrise some of the obvious variables like password or persistent storage with interpolation? |
image: gristlabs/grist:latest | ||
environment: | ||
# Use Python 3 instead of 2. | ||
PYTHON_VERSION: 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it that needed? PYTHON_VERSION_ON_CREATION
at least is set to 3 I believe. Is something Python 2 ish happening by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out it isn't, I copied it from an old example. I see we now have this in the docker image by default anyway :)
# Redis setup | ||
REDIS_URL: redis://grist-redis | ||
|
||
# MinIO setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could maybe have a comment about how the bucket needs to have version control enabled (I see you have code to do this later)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good shout, done!
# - MinIO for snapshot storage | ||
|
||
# It is STRONGLY RECOMMENDED not to use this container in a way that makes it accessible to the internet. | ||
# This setup lacks basic security or authentication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auth is something people really want, probably ranking over external db / redis / snapshots.
This is certainly a useful example though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an Auth example with OIDC. :)
Thanks for the reviews! Adding the OIDC example, then I'll incorporate the feedback from you both :) |
Added some interpolation-based config variables @jordigh, added more docs and also moved all the volumes to exist in a single "persist" sub-directory to make it easier to wipe them all. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Domain Grist is hosted at. Custom variable that's interpolated into the Authelia config | ||
APP_DOMAIN: 'grist.localhost' | ||
# Where Authelia should redirect to after successful authentication. | ||
GRIST_OAUTH_CALLBACK_URL: https://grist.localhost/oauth2/callback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I expect that people will copy this file and modify it as little as possible, this callback URL should probably also be parametrised.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameterised this and the Authelia domains. I haven't allowed full URL changes (e.g scheme, or /oauth2/callback) since they're required to be https:// and /oauth2/callback
.
|
||
## How to run this example | ||
|
||
This example can be run with `docker compose up`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add instructions on what should be changed, such as the default database and minio passwords.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some advice to update the _PASSWORD vars in the .env
file.
@@ -0,0 +1,1414 @@ | |||
# yamllint disable rule:comments-indentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was automatically generated, correct? We probably should provide or link to instructions on how to get this file, and what might be changed about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was copied from their Github, rather than auto-generated. I could add a link to the original Github at the top?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that link would be helpful.
|
||
This is automated for you in `generateSecureSecrets.sh`, which uses Authelia's docker image to populate the `./secrets` directory. | ||
|
||
This example can then be run with `docker compose up`. This will make Grist available on `https://grist.localhost` with a self-signed certificate (by default), after all the services have started. Note: it may take up to a minute for all of the services to start correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should mention that for local hosting, self-signed certs aren't a problem and should be accepted in the web browser. Not everyone knows how to click past a TLS error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some details on this.
A couple of extra things:
|
With regards to top-level clutter @jordigh - I'd be worried about discoverability. I'd expect documentation to just be a manual, not examples, personally. I'd propose we keep it top level (could rename to just docker-compose). However, we could compromise and do |
- Removes some whitespace - Removes unnecessary environment variables
2bca4b1
to
9bed145
Compare
This adds two example docker-compose files:
These give a starting point for people to create their own compose files, and to try Grist out of the box.
However, neither is suitable for a production/public environment, and both files are commented with that accordingly.