Tharindu Weerasinghe
09/18/2024, 8:30 AMyaml
spicedb:
image: "authzed/spicedb"
command: "serve"
restart: "always"
ports:
- "8080:8080"
- "9090:9090"
- "50051:50051"
environment:
- "SPICE_DB_HOST_CONF=spicedb"
- "SPICEDB_GRPC_PRESHARED_KEY=foobar"
- "SPICEDB_DATASTORE_ENGINE=postgres"
- "SPICEDB_DATASTORE_CONN_URI=postgres://postgres:postgrespw@postgres-db-auth-api:5432/spicedb?sslmode=disable"
depends_on:
- database
Is is possible to run the migrate head
command before running serve
? I tried giving the command as "migrate head && serve" but then it just migrates and exits without starting the service. I tried chaining commands using sh -c "migrate head && serve
but it seems like bash or shell is not recognized by the image. Is there a way to do this?vroldanbet
09/18/2024, 9:10 AMTharindu Weerasinghe
09/18/2024, 9:20 AM--abort-on-container-exit
flag for docker compose as I am running this in a CI/CD pipeline. Because of that, when the migration finishes the container exits and the whole process stops. That's why I'm looking for a way to do it in one go. Is there an example for that use case?vroldanbet
09/18/2024, 9:53 AMserve-testing
mode which does not need of a datastorevroldanbet
09/18/2024, 9:55 AM-debug
images (e.g. spicedb:latest-debug).Tharindu Weerasinghe
09/18/2024, 9:57 AM