compose
This commit is contained in:
+35
-6
@@ -62,15 +62,44 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
quickwit-create-index:
|
||||
image: quickwit/quickwit:0.8.2
|
||||
admin-bootstrap:
|
||||
build:
|
||||
context: ./backend
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
quickwit:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- quickwit_data:/quickwit/data
|
||||
- ./quickwit/documents-index.yaml:/tmp/documents-index.yaml:ro
|
||||
command: index create --endpoint=http://quickwit:7280 --index-config /tmp/documents-index.yaml
|
||||
environment:
|
||||
DATABASE_URL: postgres://papercrate:papercrate_dev@postgres:5432/papercrate
|
||||
DATABASE_MAX_POOL_SIZE: 2
|
||||
AWS_ENDPOINT_URL: http://minio:9000
|
||||
AWS_ACCESS_KEY_ID: minioadmin
|
||||
AWS_SECRET_ACCESS_KEY: minioadmin
|
||||
AWS_REGION: us-east-1
|
||||
S3_BUCKET: documents
|
||||
JWT_SECRET: change-me-super-secret
|
||||
QUICKWIT_ENDPOINT: http://quickwit:7280
|
||||
DEFAULT_TENANT_SLUG: admin
|
||||
entrypoint: []
|
||||
command: >
|
||||
/bin/sh -c "
|
||||
echo 'Running database migrations' &&
|
||||
diesel migration run &&
|
||||
echo 'Ensuring tenant admin exists' &&
|
||||
if papercrate-admin list-tenants | grep -q '^admin '; then
|
||||
echo 'tenant admin already exists';
|
||||
else
|
||||
papercrate-admin create-tenant admin;
|
||||
fi &&
|
||||
echo 'Ensuring demo user credentials' &&
|
||||
(papercrate-admin create-user admin adminadmin || papercrate-admin set-password admin adminadmin) &&
|
||||
echo 'Ensuring demo membership' &&
|
||||
papercrate-admin add-user-to-tenant admin admin admin &&
|
||||
echo 'Ensuring Quickwit index for admin tenant' &&
|
||||
papercrate-admin quickwit-create-index admin
|
||||
"
|
||||
user: root
|
||||
restart: "no"
|
||||
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user