Applications
Service
Adding application
To add a static website application:
ok apps add
and follow the wizard questions:
? Application name: my-test-service.outblocks.io
? Application type: service
? Application dir: /code/my-test-service
Run plugin used for application: direct
? Dir to save application YAML: /code/my-test-service
? URL of application: my-test-service.outblocks.io
? Run command of application to serve app during dev (optional, e.g. yarn dev):
? Deploy plugin used for application: gcp
Service app config
app.outblocks.yaml:
# Service app config.
# You can use ${var.*} expansion to source it from values.yaml per environment,
# e.g. url: ${var.base_url}/app1/
# Name of the app.
name: my-test-service
# Working directory of the app where all commands will be run.
# All other dirs will be relative to this one.
dir: ./service/my-test-service
# Type of the app.
type: service
# URL of the app.
url: my-test-service.outblocks.io
# Path redirect rewrites URL to specified path.
# URL path from 'url' field will be stripped and replaced with value below.
# '/' should be fine for most apps.
path_redirect: /
# If app is not meant to be accessible without auth, mark it as private.
# private: true
# Build defines how docker image will be built for this application.
build:
# Dockerfile name to be used.
dockerfile: Dockerfile
# Directory which is used for dockerfile context.
context: .
# Deploy defines where how deployment is handled of application during `ok deploy`.
deploy:
plugin: gcp
# Run defines where how development is handled of application during `ok run`.
run:
plugin: direct
# Command to be run to for dev mode.
command: ''
# Additional environment variables to pass.
# env:
# BROWSER: none # disable opening browser for react app
# Port override, by default just assigns next port starting from listen-port.
# port: 8123