Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 2.87 KB

onboarding.md

File metadata and controls

60 lines (38 loc) · 2.87 KB

Onboarding your Service

Containerizing Your service

1. Create a docker image for your service

Examples:

Ensure the following:

  • Docker image includes a HEALTHCHECK for the docker-test.yaml workflow. Ensure that health check parameters are adequate for your services.
  • You can set DISABLE_HEALTHCHECK=true in actions environment in your repository to disable Healthcheck test in the workflow

References:

2. Add a workflow to build and push docker image to ghcr.io

Example: /examples/workflows/build-and-push.yaml

Important

In case you see 403 error, checkout this

Reference:

3. Add a workflow to test your image

Example: /examples/workflows/docker-test.yaml

Adding your service

1. Add service to compose

Example: demo_service

Raise a PR with the following changes

  • docker-compose.yaml updated with your required services
    • Ensure each service has a name in snake_case
    • Ensure to add a restart policy to your services so that it restarts on exit
    • Refrain exposing any ports in compose file (see caddy section below)
    • Add environment variables to sample.env and format the mandatory variables as ${VAR:?error} in the compose file.
    • You must configure an image tag, memory, cpu limit and replicas for your service. Refer to above example for the standard format.

2. Exposing service using caddy (Optional)

  • For services you want to expose to the public, add the below block for each service to the caddy/Caddyfile.

    {$DOMAIN_SCHEME}://<service-name>.{$DOMAIN_NAME} {
        reverse_proxy <service-name-in-docker-compose>:<service-port>
    }