Web Service

Description

Web Service is a workload type to describe long-running, scalable, containerized services that have a stable network endpoint to receive external network traffic from customers.

If workload type is skipped for any service defined in Appfile, it will be defaulted to Web Service type.

Specification

List of all configuration options for a Web Service workload type.

  1. name: my-app-name
  2. services:
  3. my-service-name:
  4. type: webservice # could be skipped
  5. image: oamdev/testapp:v1
  6. cmd: ["node", "server.js"]
  7. port: 8080
  8. cpu: "0.1"
  9. env:
  10. - name: FOO
  11. value: bar
  12. - name: FOO
  13. valueFrom:
  14. secretKeyRef:
  15. name: bar
  16. key: bar

Parameters

NameTypeDescriptionNotes
Cmd[]string[optional]
Env[]WebserviceEnv[optional]
ImagestringWhich image would you like to use for your service
Portint32Which port do you want customer traffic sent to[default to 80]
cpustringNumber of CPU units for the service, like 0.5 (0.5 CPU core), 1 (1 CPU core)[optional]

WebserviceEnv

NameTypeDescriptionNotes
Namestring
Valuestring[optional]
ValueFromWebserviceValueFrom[optional]

WebserviceValueFrom

NameTypeDescriptionNotes
SecretKeyRefWebserviceValueFromSecretKeyRef

WebserviceValueFromSecretKeyRef

NameTypeDescriptionNotes
Namestring
Keystring