Skip to content

Commit

Permalink
docs: add deployment docs to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst committed Apr 16, 2024
1 parent 3205147 commit 76c8f1d
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,34 @@ run a development server on [http://localhost:3000](http://localhost:3000):
```bash
pnpm run dev
```

## how to deploy

- ask a sysadmin to create a new acdh-ch kubernetes project.
- create a new namespace in that project via [rancher](https://rancher.acdh-dev.oeaw.ac.at), and set
the `KUBE_NAMESPACE` github variable as well as the
[`app_name`](./.github/workflows/build-deploy.yml#L36) to that namespace.
- set the `PUBLIC_URL` github variable to the application's public url (e.g.
"https://my-app.acdh-ch-dev.oeaw.ac.at"), and set the `KUBE_INGRESS_BASE_DOMAIN` to the public
url's base domain (e.g. "acdh-ch-dev.oeaw.ac.at").
- create a service issue in the acdh-ch [redmine](https://redmine.acdh.oeaw.ac.at) issue tracker,
and set the `SERVICE_ID` github variable to the issue number. this should match the
`NUXT_PUBLIC_REDMINE_ID` variable in your `.env.local` file.
- ensure required build args (prefixed with `NUXT_PUBLIC_`) are referenced in both the
[`Dockerfle`](./Dockerfile), as well as the [validation](./.github/workflows/validate.yml) as
[deployment](./.github/workflows/build-deploy.yml) pipelines, and set as github variables.
- ensure required runtime environment variables are referenced in the
[validation](./.github/workflows/validate.yml) and
[deployment](./.github/workflows/build-deploy.yml) pipelines, and set as github secrets. github
secrets need to be prefixed with `K8S_SECRET_` to be automatically copied to the runtime
environment. in case you need secrets in the docker build context, you can
[mount a secret in the Dockerfile](https://docs.docker.com/build/building/secrets/).
- ensure both the github repository, as well as the
[package registry](https://github.com/orgs/acdh-oeaw/packages/container/my-app/settings) is set to
public.

if everything is set up correctly, every git push to the `main` branch will create a new deployment
if the validation pipeline passes.

you can reference the [template repository](https://github.com/acdh-oeaw/template-app-nuxt) for a
working setup.

0 comments on commit 76c8f1d

Please sign in to comment.