Skip to content

Latest commit

 

History

History
102 lines (68 loc) · 2.24 KB

README.md

File metadata and controls

102 lines (68 loc) · 2.24 KB

onlyoffice-droplets-starter

Key generation

  1. Add the ssh key to your DO account

  2. You'll need to generate an access token in DigitalOcean's control panel

    Account api token

  3. After add digitalocean API token in file

    WARNING: Do not give the token to third parties and do not put it on github!

      ~/.do/access_token

Configuration

It is necessary to fill in the values of variables in the file

  ./lib/data/static_data.rb
  • PROJECT_NAME: [Optional] - If you want to add a droplet to the selected project
  • LOADER_PATTERN: [Required] - Name pattern on your droplets
  • DROPLET_REGION: [Required] - default: 'nyc3'
  • DROPLET_IMAGE: [Required] - default: 'docker-20-04'
  • DROPLET_SIZE: [Required] - default: 's-1vcpu-1gb'
  • SSH_KEY_ID: [Required] - *Find this value after the Api request

SSH_KEY_ID

To set the SSH_KEY_ID, you need to send a GET request.

Api documentation List All SSH Keys

Or you can use the script for a quick search

For Linux:

  #!/bin/bash

  DIGITALOCEAN_TOKEN=$(cat ~/.do/access_token)

  # install jq util for linux
  sudo apt update && sudo apt install jq
  # install jq util for macOS
  brew install jq

  curl -X GET \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
    "https://api.digitalocean.com/v2/account/keys" \
    | jq

In the output of the script copy the id value for your ssh and set the value in the file:

  ~/.do/ssh_key_id

Finally for configuration add the document server version to the bash script

  ./lib/bash_script/script.sh

Set project dependencies

  bundle install

Usage

All rake commands

  rake -T

Command for start droplets

  rake create_droplets[container_count]

Where the [container_count] should contain the number [integer] of droplets to open.

Command for start convert_service_testing

  rake launch[7.0.0.0]