Files
bracket/docs/content/deployment/nomad.mdx
Copilot 3606868b98 frontend: replace Prettier stack with oxfmt (#1750)
This PR migrates formatting in `frontend/` from Prettier to `oxfmt`,
including script wiring and dependency cleanup. It removes the Prettier
plugin/config path so formatting is handled by a single tool.

- **Script migration**
  - Renamed/rewired formatting scripts in `frontend/package.json`:
    - `prettier:check` → `format:check` (`oxfmt --check .`)
    - `prettier:write` → `format:write` (`oxfmt .`)
  - Updated dependent scripts:
    - `test` now runs `pnpm run format:write`
    - `openapi-ts` now runs `pnpm run format:write` after generation

- **Dependency cleanup**
  - Removed `prettier-plugin-organize-imports` from `dependencies`
  - Removed `prettier` from `devDependencies`
  - Added `oxfmt` (latest stable at update time)

- **Config removal**
  - Deleted `frontend/.prettierrc.js` (no longer used after migration)

- **Lockfile alignment**
- Updated `frontend/pnpm-lock.yaml` to reflect the dependency and script
ecosystem change

```json
{
  "scripts": {
    "format:check": "oxfmt --check .",
    "format:write": "oxfmt .",
    "openapi-ts": "openapi-ts && pnpm run format:write",
    "test": "tsc && pnpm run format:write"
  }
}
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Erik Vroon <11857441+evroon@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-28 18:38:17 +00:00

111 lines
2.1 KiB
Plaintext

---
title: Nomad
---
# Nomad
This section describes how to deploy Bracket (frontend and backend) to
[Nomad](https://www.nomadproject.io).
First, make sure you have a running Nomad cluster. See the
[production deployment guide](https://developer.hashicorp.com/nomad/tutorials/enterprise/production-deployment-guide-vm-with-consul) {/* <!-- markdownlint-disable-line --> */}
on how to achieve that.
Then, you can use the following files describing the tasks for the backend and frontend.
## Backend
```hcl
job "bracket-backend" {
datacenters = ["*"]
group "servers" {
count = 1
network {
port "uvicorn" {
to = 8400
}
}
service {
provider = "nomad"
port = "uvicorn"
}
task "api" {
driver = "docker"
env {
ENVIRONMENT = "PRODUCTION"
PG_DSN = "postgresql://bracket_prod:bracket_prod@postgres:5432/bracket_prod"
JWT_SECRET = "38af87ade31804cc115166f605586a57c6533eeb4342e66c5229f44a76afdde4"
AUTO_RUN_MIGRATIONS = "false"
}
config {
image = "ghcr.io/evroon/bracket-backend"
ports = ["uvicorn"]
command = "uv"
args = [
"run",
"uvicorn",
"bracket.app:app",
"--port",
"${NOMAD_PORT_uvicorn}",
"--host",
"0.0.0.0",
]
}
resources {
cpu = 256
memory = 512
}
}
}
}
```
## Frontend
```hcl
job "bracket-frontend" {
datacenters = ["*"]
group "servers" {
count = 1
network {
port "nextjs" { }
}
service {
provider = "nomad"
port = "nextjs"
}
task "api" {
driver = "docker"
env {
VITE_API_BASE_URL = "https://my.bracketdomain.com"
VITE_HCAPTCHA_SITE_KEY = "xxxxx"
NODE_ENV = "production"
}
config {
image = "ghcr.io/evroon/bracket-frontend"
ports = ["nextjs"]
args = ["pnpm", "start", "-p", "${NOMAD_PORT_nextjs}"]
}
resources {
cpu = 256
memory = 512
}
}
}
}
```