# A jssandbox image that takes in javascript from a file
#
# Note: 
#   The TRANSPORT_NAME environment variable must be set
#   The application must be linked in as `/app/app.js`
#   The application config must be linked in as `/app/config.json`
#   Redis container must be linked as `redis`
#   RabbitMQ container must be linked as `rabbitmq`

# application configuration

worker_name: jsbox_application
javascript_file: app.js
sandbox_id: sandbox1

app_context: "{require: function(m) { if (['moment', 'url', 'querystring', 'crypto', 'lodash', 'q', 'jed', 'vumigo_v01', 'vumigo_v02', 'go-jsbox-location', 'go-jsbox-metrics-helper', 'go-jsbox-ona', 'go-jsbox-xform'].indexOf(m) >= 0) return require(m); return null; }, Buffer: Buffer}"

rlimits:
  RLIMIT_DATA: [67108864, 67108864] # 64 MB
  RLIMIT_STACK: [2097152, 2097152] # 2 MB
  RLIMIT_AS: [268435456, 268435456] # 256 MB

sandbox:
  config:
    cls: vxsandbox.resources.config.FileConfigResource
    keys:
      config: config.json
  http:
    cls: vxsandbox.resources.http.HttpClientResource
  kv:
    cls: vxsandbox.resources.kv.RedisResource
    redis_manager:
      key_prefix: "vumi.jsbox.kv"
      db: 1
      host: 'redis'
      port: 6379
    keys_per_user: 550000
  outbound:
    cls: vxsandbox.resources.outbound.OutboundResource

# middleware configuration

middleware:
  - logging_mw: vumi.middleware.logging.LoggingMiddleware

logging_mw:
  log_level: debug

Add config file for javascript sandbox
Add config file for javascript sandbox
