mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
88 lines
2.5 KiB
YAML
88 lines
2.5 KiB
YAML
|
# This examples shows how to start up Grist that:
|
||
|
# - Uses Postgres as a home database,
|
||
|
# - Redis as a state store.
|
||
|
# - 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.
|
||
|
# See https://support.getgrist.com for more information.
|
||
|
|
||
|
# This setup is based on one provided by Akito (https://github.com/theAkito).
|
||
|
|
||
|
services:
|
||
|
grist:
|
||
|
image: gristlabs/grist:latest
|
||
|
environment:
|
||
|
# Use Python 3 instead of 2.
|
||
|
PYTHON_VERSION: 3
|
||
|
|
||
|
# Postgres database setup
|
||
|
TYPEORM_DATABASE: grist
|
||
|
TYPEORM_USERNAME: grist
|
||
|
TYPEORM_HOST: grist-db
|
||
|
TYPEORM_LOGGING: false
|
||
|
TYPEORM_PASSWORD: CHANGE THIS PASSWORD
|
||
|
TYPEORM_PORT: 5432
|
||
|
TYPEORM_TYPE: postgres
|
||
|
|
||
|
# Redis setup
|
||
|
REDIS_URL: redis://grist-redis
|
||
|
|
||
|
# MinIO setup
|
||
|
GRIST_DOCS_MINIO_ACCESS_KEY: grist
|
||
|
GRIST_DOCS_MINIO_SECRET_KEY: CHANGE THIS MINIO PASSWORD
|
||
|
GRIST_DOCS_MINIO_USE_SSL: 0
|
||
|
GRIST_DOCS_MINIO_BUCKET: grist-docs
|
||
|
GRIST_DOCS_MINIO_ENDPOINT: grist-minio
|
||
|
GRIST_DOCS_MINIO_PORT: 9000
|
||
|
|
||
|
volumes:
|
||
|
# Where to store persistent data, such as documents.
|
||
|
- ./grist_local_data:/persist
|
||
|
ports:
|
||
|
- 8484:8484
|
||
|
depends_on:
|
||
|
- grist-db
|
||
|
- grist-redis
|
||
|
- grist-minio
|
||
|
- minio-setup
|
||
|
|
||
|
grist-db:
|
||
|
image: postgres:alpine
|
||
|
environment:
|
||
|
POSTGRES_DB: grist
|
||
|
POSTGRES_USER: grist
|
||
|
POSTGRES_PASSWORD: CHANGE THIS PASSWORD
|
||
|
volumes:
|
||
|
- ./grist_database:/var/lib/postgresql/data
|
||
|
|
||
|
grist-redis:
|
||
|
image: redis:alpine
|
||
|
volumes:
|
||
|
- ./grist_redis:/data
|
||
|
|
||
|
grist-minio:
|
||
|
image: minio/minio:latest
|
||
|
environment:
|
||
|
MINIO_ROOT_USER: grist
|
||
|
MINIO_ROOT_PASSWORD: CHANGE THIS MINIO PASSWORD
|
||
|
volumes:
|
||
|
- ./grist_minio:/data
|
||
|
command:
|
||
|
server /data --console-address=":9001"
|
||
|
|
||
|
# This sets up the buckets required in MinIO. It is only needed to make this example work.
|
||
|
# It isn't necessary for deployment and can be safely removed.
|
||
|
minio-setup:
|
||
|
image: minio/mc
|
||
|
depends_on:
|
||
|
grist-minio:
|
||
|
condition: service_started
|
||
|
restart: on-failure
|
||
|
entrypoint: >
|
||
|
/bin/sh -c "
|
||
|
/usr/bin/mc alias set myminio http://grist-minio:9000 grist 'CHANGE THIS MINIO PASSWORD';
|
||
|
/usr/bin/mc mb myminio/grist-docs;
|
||
|
/usr/bin/mc anonymous set public myminio/grist-docs;
|
||
|
/usr/bin/mc version enable myminio/grist-docs;
|
||
|
"
|