Files
bracket/docs/content/deployment/docker.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

97 lines
2.9 KiB
Plaintext

---
title: Docker
---
import { Callout } from "nextra/components";
# Docker
This section describes how to deploy Bracket (frontend and backend) to docker using docker-compose.
## 1. Install Docker and docker compose
First, make sure you have docker and docker compose installed.
## 2. Store the docker-compose.yml file
Then, store the following YAML in a file called `docker-compose.yml` in an empty directory.
The highlighted lines will be discussed in the next steps.
```yaml
services:
bracket-frontend:
image: ghcr.io/evroon/bracket-frontend
container_name: bracket-frontend
ports:
- "3000:3000"
environment:
NODE_ENV: "production"
VITE_API_BASE_URL: "http://your-site.com:8400"
VITE_HCAPTCHA_SITE_KEY: "10000000-ffff-ffff-ffff-000000000001"
restart: unless-stopped
bracket-backend:
image: ghcr.io/evroon/bracket-backend
container_name: bracket-backend
ports:
- "8400:8400"
environment:
ENVIRONMENT: "PRODUCTION"
PG_DSN: "postgresql://bracket_prod:bracket_prod@postgres:5432/bracket_prod"
CORS_ORIGINS: https://your-site.com
JWT_SECRET: change_me
volumes:
- ./backend/static:/app/static
restart: unless-stopped
depends_on:
- postgres
postgres:
image: postgres
restart: always
environment:
POSTGRES_DB: bracket_prod
POSTGRES_USER: bracket_prod
POSTGRES_PASSWORD: bracket_prod
volumes:
- ./postgres:/var/lib/postgresql
```
## 3. Set up the environment variables
Replace the lines that are highlighted in the code block from the previous step.
Replace the following values for `bracket-frontend`:
- `VITE_API_BASE_URL`: The address of your backend. The frontend will send
requests to this address.
- `VITE_HCAPTCHA_SITE_KEY`: Either leave empty to disable it or
[signup for hCaptcha](https://dashboard.hcaptcha.com/signup), create a site and
put the site key here
Replace the following values for `bracket-backend`:
- `PG_DSN`: The DSN with format `postgresql://<username>:<password>@<host>:<port>/<database>`
- `CORS_ORIGINS`: Put the address of your frontend here, it's used to make sure incoming requests
can only come from your actual frontend
- `JWT_SECRET`: Generate a secret to create JWTs using `openssl rand -hex 32`
<Callout>
Note that your `docker-compose.yml` file now contains secrets. If you want a more secure setup,
you can store secrets in separate files on the host and load them via [docker
secrets](https://docs.docker.com/compose/use-secrets/).
</Callout>
## 4. Update volume bindings
Bracket needs two volume bindings: for the backend and for the database.
Update the two volume binding paths to point to a directory where you want to store the
persistent data.
## 5. Access the application
Run it using `docker compose up -d` in the same directory as the file.
Access Bracket at `http://localhost:3000`.