Application Sub Type: Server

An application always has a type of app, and a sub_type. These docs are for the server sub_type.

Contents

  1. Config file structure
  2. Full Example

Config file structure

A server application is one that needs to have DNS and be accessible by other applications or end users. A server can be anything, but is often a backend API with multiple routes.

The following fields are available for a server application:

name type default required
type string always app true
sub_type string always server true
name string same as resource_label true
port string 8080 true
health_check_path string / false
command list/slice of strings none false
cpu int/number 256 (0.25 vCPU) false
memory int/number 1 GB false
iam_permissions list/slice none false
environments list/slice none true

iam_permissions

A list of objects, where each object has the following available fields.

Field name Field type Default value Required
Effect string; one of Allow or Deny none true
Action list/slice; the AWS actions your app needs permission to perform (ie, s3:GetObject) none true
Resource list/slice; the AWS resources your application needs access to none true

environments

A list of objects, where each object has the following available fields

| Field name | Field type | Default value | Required | |:————————|:———————————————————————————————————————————————-|:——————————-|:———| | environment | string; the resource_label for the environment | none | true | | group | string; the resource_label for the group the environment belongs to | none | true | | cloudflare_domain_names | list/slice; Fully qualified cloudflare domain names to use for your app environment. Must also have a Cloudflare api key saved to DragonOps.* | none | false | | route53_domain_names | list/slice; Fully qualified route53 domain names (other than the default DragonOps domain we provide) to use for your app environment. | none | false | | command | list/slice of strings | none | false | | cpu | string | none (same as defined in root) | false | | memory | string | none (same as defined in root) | false | | ecs_enabled | boolean; configured to cost-optimize even further. Observability is greatly reduced with this option | false | false | | eks_enabled | boolean | true | false |

  • You can save your Cloudflare API key to DragonOps by running dragonops config set cloudflare_api_key <your_api_key>.

Full Example

Here is a full example of a server application config file.

my_app:
  name: my-app
  type: app
  sub_type: server
  port: "8080"
  health_check_path: /
  iam_permissions:
    - Effect: Allow
      Action:
        - s3:GetObject
      Resource:
        - arn:aws:s3:::my_bucket/*
  environments:
    - environment: dev_environment
      group: preprod_group
      cloudflare_domain_names:
        - my-dev-app.mycloudflaredomain.com
    - environment: stage_environment
      group: preprod_group
      cloudflare_domain_names:
        - my-stage-app.mycloudflaredomain.com
      cpu: 0.5
      memory: 2
      command:
        - "python3"
        - "./test.py"
      iam_permissions:
        - Effect: Allow
          Action:
            - s3:GetObject
          Resource:
            - arn:aws:s3:::my_stage_bucket/*
  cpu: 256
  memory: 1024