mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Adds docker compose examples
This commit is contained in:
parent
73e022b0c5
commit
d75888ac03
17
docker-compose-examples/grist-local-testing.yml
Normal file
17
docker-compose-examples/grist-local-testing.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# This is the simplest example that runs Grist, suitable for local testing.
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
services:
|
||||||
|
grist:
|
||||||
|
image: gristlabs/grist:latest
|
||||||
|
environment:
|
||||||
|
# Use Python 3 instead of 2.
|
||||||
|
PYTHON_VERSION: 3
|
||||||
|
volumes:
|
||||||
|
# Where to store persistent data, such as documents.
|
||||||
|
- ./grist_local_data:/persist
|
||||||
|
ports:
|
||||||
|
- 8484:8484
|
88
docker-compose-examples/grist-with-postgres-redis-minio.yml
Normal file
88
docker-compose-examples/grist-with-postgres-redis-minio.yml
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
# 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;
|
||||||
|
"
|
Loading…
Reference in New Issue
Block a user