Deploy to Aptible

  1. Add your public SSH key to your Aptible account through the Aptible dashboard
  2. Install the Aptible CLI, and login. Documentation for this can be found here: https://www.aptible.com/documentation/deploy/cli.html
  3. Login to your aptible account if not already signed in with aptible login
  4. Create a new Aptible app with aptible apps:create secoda
  5. Add a Postgres database: aptible db:create secoda-postgres --type postgresql --version 13
  6. Add Elasticsearch: aptible db:create secoda-es --type elasticsearch --version 6.8
  7. Add Redis: aptible db:create secoda-redis --type redis --version 5.0
  8. Configure the DockerHub environment variables
aptible config:set --app secoda \\
APTIBLE_PRIVATE_REGISTRY_USERNAME=xxxxxxxx \\
# REPLACE WITH PASSWORD SUPPLIED BY SECODA
APTIBLE_PRIVATE_REGISTRY_PASSWORD=xxxxxxxx \\
# REPLACE WITH LICENSE SUPPLIED BY SECODA
LICENSE=xxxxxxxxxxx
  1. Deploy the application aptible deploy --app secoda --docker-image secoda/app:latest

  2. Scale the Secoda app to a minimum of 8GB of memory aptible apps:scale --app secoda cmd --container-size 7168

  3. Configure the environment variables

    aptible config:set --app secoda \\
    STRICT_HEALTH_CHECKS=true \\
    RELEASE_HEALTHCHECK_TIMEOUT=600 \\
    DATABASE_CONN=<postgres-connection-url> \\
    # IDENTICAL TO DATABASE_CONN
    SQLALCHEMY_DATABASE_URI=<postgres-connection-url> \\
    # SHOULD MATCH PASSWORD IN DATABASE_CONN
    POSTGRES_PASSWORD=<postgres-password> \\
    # SHOULD MATCH PASSWORD IN DATABASE_CONN
    DB_PASSWORD=<postgres-password> \\
    # SHOULD MATCH HOSTNAME IN DATABASE_CONN
    DB_ADDR=<postgres-host> \\
    # SHOULD MATCH PORT IN DATABASE_CONN             
    DB_PORT=<postgres-port> \\
    DB_DATABASE=db \\
    DB_USER=aptible \\
    # KEYCLOAK PW CAN BE CHANGED AND SAVED SOMEWHERE SAFE
    KEYCLOAK_PASSWORD=JdbhbhiGBLVV6kJP \\
    ES_HOST=<es-connection-url> \\
    ES_PASSWORD=<elasticsearch-password> \\
    ES_USER=aptible \\
    REDIS_URL=<redis-connection-url>/0 \\
    # REPLACE TO MATCH S3 BUCKET IAM
    AWS_ACCESS_KEY_ID=<aws-access-key-id> \\
    AWS_SECRET_ACCESS_KEY=<aws-secret-access-key> \\
    # REPLACE TO MATCH YOUR S3 BUCKET
    S3_BUCKET_PATH=s3://<bucket-path>
    
  4. Create a default Aptible endpoint aptible endpoints:https:create --app secoda cmd --default-domain

  5. Update your domain config aptible config:set --app secoda DOMAIN=https://<your-domain> APP_BASE=https://<your-domain>

    You can view your domain with aptible endpoints:list --app secoda

  6. Navigate to your endpoint and sign up as a new user in your Secoda instance

Set Up Google OAuth

  1. Go to the Google Cloud Console and create or use an existing project. Then go to APIs and service and click "+ CREATE CREDENTIALS" and select "OAuth client ID"