docs(todo): list what documenting the deployment needs
The Jenkins job's steps live only in Jenkins; note the image builds, the env file, the nginx block and the checks the Java backend needs.
This commit is contained in:
parent
077cf0185c
commit
12538a0ef8
15
TODO.md
15
TODO.md
@ -94,6 +94,21 @@ See `docs/specs/rematch`.
|
|||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
|
- [ ] Document the deployment (e.g. `docs/deployment.md`, or a `Jenkinsfile` in the repo). Today it is a Jenkins
|
||||||
|
job at `ci.playmancala.app` whose shell steps live only in Jenkins; it still builds from `apps/backend` and
|
||||||
|
`apps/frontend` and runs `cd apps && docker compose up -d`. For the Java backend it needs:
|
||||||
|
- `docker build -f apps/backend/Dockerfile -t jhalitaksoy/mancala-backend:latest .` from the repo root
|
||||||
|
- `docker build -f apps/frontend/Dockerfile` with `--build-arg` `SERVER_ADDRESS=https://api.playmancala.app`,
|
||||||
|
`WS_SERVER_ADDRESS=wss://api.playmancala.app`, `KEYCLOAK_URL=https://auth.playmancala.app`
|
||||||
|
- `docker build -t jhalitaksoy/mancala-keycloak:latest apps/keycloak`
|
||||||
|
- `docker compose --env-file <path>/mancala.env up -d` in `apps`, with the env file kept outside the Jenkins
|
||||||
|
workspace (`POSTGRES_PASSWORD`, `KEYCLOAK_DB_PASSWORD`, `MANCALA_DB_PASSWORD`, `KEYCLOAK_ADMIN_USERNAME`,
|
||||||
|
`KEYCLOAK_ADMIN_PASSWORD`, `KEYCLOAK_HOSTNAME=https://auth.playmancala.app`, `LEGACY_USERKEY_AUTH`)
|
||||||
|
- Once, by hand: the `auth.playmancala.app` block of `config/nginx.conf` on the server and an nginx reload.
|
||||||
|
DNS and the certificate for `auth.playmancala.app` already exist
|
||||||
|
- If Jenkins runs in a container with the host's Docker socket, the `./postgres/init` bind mount points at a
|
||||||
|
path the host does not have and the databases are not created; check before the first deploy
|
||||||
|
- Which branch the job builds, and whether it builds on push
|
||||||
- [ ] Build the backend and frontend images from the repo root in CI:
|
- [ ] Build the backend and frontend images from the repo root in CI:
|
||||||
`docker build -f apps/backend/Dockerfile .` and `docker build -f apps/frontend/Dockerfile .`
|
`docker build -f apps/backend/Dockerfile .` and `docker build -f apps/frontend/Dockerfile .`
|
||||||
- [ ] Pass `--build-arg KEYCLOAK_URL=https://auth.playmancala.app` when building the frontend image
|
- [ ] Pass `--build-arg KEYCLOAK_URL=https://auth.playmancala.app` when building the frontend image
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user