Question

Fail to deploy singlestore/cluster-in-a-box as an app

Posted December 16, 2021 120 views
DockerDatabasesDigitalOcean App Platform

As following the tutorial https://docs.digitalocean.com/products/app-platform/languages-frameworks/docker/#configuring-app-platform-for-docker-application, I’m trying to run a SingleStore cluster as an app.
Here is my configuration:

alerts:
- rule: DEPLOYMENT_FAILED
- rule: DOMAIN_FAILED
name: singlestore-cluster-in-a-box
region: nyc
services:
- envs:
  - key: LICENSE_KEY
    scope: RUN_AND_BUILD_TIME
    value: <LICENSE>
  - key: ROOT_PASSWORD
    scope: RUN_AND_BUILD_TIME
    value: <PASSWORD>
  http_port: 8080
  image:
    registry: singlestore
    registry_type: DOCKER_HUB
    repository: cluster-in-a-box
    tag: latest
  instance_count: 1
  instance_size_slug: basic-xs
  name: singlestore-cluster-in-a-box
  routes:
  - path: /
  source_dir: /

The local command to run the same docker (https://docs.singlestore.com/db/v7.6/en/deploy/cluster-in-a-box/run-the-container/start-the-container.html) should be:

docker run -i --init \
    --name singlestore-ciab \
    -e LICENSE_KEY=$LICENSE_KEY \
    -e ROOT_PASSWORD=$ROOT_PASSWORD \
    -p 3306:3306 -p 8080:8080 \
    singlestore/cluster-in-a-box

docker start singlestore-ciab

And as I see from the deployment logs, the run command was executed successfully:

[2021-12-16 11:55:30] 2021-12-16 11:55:30.652549 Initializing SingleStore Cluster in a Box
[2021-12-16 11:55:30] 2021-12-16 11:55:30.652852 Creating...
[2021-12-16 11:55:34] 2021-12-16 11:55:34.267177 Done.
[2021-12-16 11:55:34] 2021-12-16 11:55:34.267556 Configuring...
[2021-12-16 11:55:36] 2021-12-16 11:55:36.615602 Done.
[2021-12-16 11:55:36] 2021-12-16 11:55:36.617000 Bootstrapping...
[2021-12-16 11:55:52] 2021-12-16 11:55:52.920148 Done.
[2021-12-16 11:55:52] 2021-12-16 11:55:52.920507 Configuring Toolbox...
[2021-12-16 11:55:54] 2021-12-16 11:55:54.611452 Done.
[2021-12-16 11:55:54] 
[2021-12-16 11:55:54] Successful initialization!
[2021-12-16 11:55:54] 
[2021-12-16 11:55:54] To start the cluster:
[2021-12-16 11:55:54]     docker start (CONTAINER_NAME)
[2021-12-16 11:55:54] 
[2021-12-16 11:55:54] To stop the cluster (must be started):
[2021-12-16 11:55:54]     docker stop (CONTAINER_NAME)
[2021-12-16 11:55:54] 
[2021-12-16 11:55:54] To remove the cluster (all data will be deleted):
[2021-12-16 11:55:54]     docker rm (CONTAINER_NAME)
[2021-12-16 11:55:54] 
[]

But, then I got Deploy Error: Non-Zero Exit Code. And I have no idea where this exit code came from. When I run the same command locally, it works fine and returns 0. How can I troubleshoot this? Or, should I somehow override the run command?

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!