auto-fix linting

This commit is contained in:
BlackSigkill 2026-02-06 21:53:17 +01:00
parent ccb1a17f44
commit 408e8a019b
3 changed files with 106 additions and 105 deletions

View file

@ -39,24 +39,24 @@ Visit `http://localhost:5173` (hot-reload enabled)
Docker Compose [profiles](https://docs.docker.com/compose/how-tos/profiles/) control which services start. A service with no profile always runs. A service with a profile only runs when that profile is activated. Docker Compose [profiles](https://docs.docker.com/compose/how-tos/profiles/) control which services start. A service with no profile always runs. A service with a profile only runs when that profile is activated.
| Command | What starts | | Command | What starts |
|---------|-------------| | --------------------------------------------------------- | ------------------------------------ |
| `docker compose up -d` | Monochrome | | `docker compose up -d` | Monochrome |
| `docker compose --profile pocketbase up -d` | Monochrome + PocketBase | | `docker compose --profile pocketbase up -d` | Monochrome + PocketBase |
| `docker compose --profile dev up -d` | Monochrome + Dev server | | `docker compose --profile dev up -d` | Monochrome + Dev server |
| `docker compose --profile dev --profile pocketbase up -d` | Monochrome + Dev server + PocketBase | | `docker compose --profile dev --profile pocketbase up -d` | Monochrome + Dev server + PocketBase |
In `docker-compose.yml`, it looks like this: In `docker-compose.yml`, it looks like this:
```yaml ```yaml
services: services:
monochrome: # no profile -- always starts monochrome: # no profile -- always starts
pocketbase: pocketbase:
profiles: ["pocketbase"] # opt-in profiles: ['pocketbase'] # opt-in
monochrome-dev: monochrome-dev:
profiles: ["dev"] # opt-in profiles: ['dev'] # opt-in
``` ```
### Override File ### Override File
@ -72,19 +72,19 @@ The override file does not exist in the upstream repo, don't search it!
```yaml ```yaml
# docker-compose.override.yml # docker-compose.override.yml
services: services:
pocketbase: pocketbase:
labels: labels:
- traefik.enable=true - traefik.enable=true
- traefik.http.routers.pocketbase.rule=Host(`pocketbase.example.com`) - traefik.http.routers.pocketbase.rule=Host(`pocketbase.example.com`)
- traefik.http.routers.pocketbase.entrypoints=websecure - traefik.http.routers.pocketbase.entrypoints=websecure
- traefik.http.routers.pocketbase.tls.certresolver=letsencrypt - traefik.http.routers.pocketbase.tls.certresolver=letsencrypt
- traefik.http.services.pocketbase.loadbalancer.server.port=8090 - traefik.http.services.pocketbase.loadbalancer.server.port=8090
networks: networks:
- proxy-network - proxy-network
networks: networks:
proxy-network: proxy-network:
external: true external: true
``` ```
**Example** -- adding a custom service in your fork: **Example** -- adding a custom service in your fork:
@ -92,13 +92,13 @@ networks:
```yaml ```yaml
# docker-compose.override.yml # docker-compose.override.yml
services: services:
my-custom-api: my-custom-api:
image: my-api:latest image: my-api:latest
restart: unless-stopped restart: unless-stopped
ports: ports:
- "4000:4000" - '4000:4000'
networks: networks:
- monochrome-network - monochrome-network
``` ```
Override files can extend existing services (add labels, env vars, networks) and define entirely new services. See the [Docker docs](https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/) for the full merge behavior. Override files can extend existing services (add labels, env vars, networks) and define entirely new services. See the [Docker docs](https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/) for the full merge behavior.
@ -116,10 +116,10 @@ Portainer can deploy directly from your GitHub fork with auto-updates on push.
3. Compose path: `docker-compose.yml` 3. Compose path: `docker-compose.yml`
4. If your fork has a `docker-compose.override.yml`, Portainer loads it automatically 4. If your fork has a `docker-compose.override.yml`, Portainer loads it automatically
5. Under **Environment variables**, add: 5. Under **Environment variables**, add:
- `COMPOSE_PROFILES=pocketbase` (to enable PocketBase -- omit if not needed) - `COMPOSE_PROFILES=pocketbase` (to enable PocketBase -- omit if not needed)
- `PB_ADMIN_EMAIL=your@email.com` - `PB_ADMIN_EMAIL=your@email.com`
- `PB_ADMIN_PASSWORD=your_secure_password` - `PB_ADMIN_PASSWORD=your_secure_password`
- Any other variables from `.env.example` - Any other variables from `.env.example`
6. Enable **GitOps updates** to auto-redeploy on push 6. Enable **GitOps updates** to auto-redeploy on push
> **Tip:** `COMPOSE_PROFILES` is a built-in Docker Compose variable. Setting it to `pocketbase` is equivalent to passing `--profile pocketbase` on the command line. > **Tip:** `COMPOSE_PROFILES` is a built-in Docker Compose variable. Setting it to `pocketbase` is equivalent to passing `--profile pocketbase` on the command line.
@ -176,12 +176,12 @@ Node.js Alpine image with source code mounted as a volume for hot-reload.
### Files ### Files
| File | Purpose | In upstream repo | | File | Purpose | In upstream repo |
|------|---------|:---:| | ----------------------------- | ----------------------------- | :--------------: |
| `docker-compose.yml` | All services with profiles | Yes | | `docker-compose.yml` | All services with profiles | Yes |
| `docker-compose.override.yml` | Fork-specific customizations | No | | `docker-compose.override.yml` | Fork-specific customizations | No |
| `.env.example` | Environment variable template | Yes | | `.env.example` | Environment variable template | Yes |
| `.env` | Your local configuration | No | | `.env` | Your local configuration | No |
| `Dockerfile` | Production build | Yes | | `Dockerfile` | Production build | Yes |
| `Dockerfile.dev` | Development build | Yes | | `Dockerfile.dev` | Development build | Yes |
| `.dockerignore` | Build context exclusions | Yes | | `.dockerignore` | Build context exclusions | Yes |

View file

@ -120,6 +120,7 @@ Visit `http://localhost:3000`
For PocketBase, development mode, and advanced setups, see [DOCKER.md](DOCKER.md). For PocketBase, development mode, and advanced setups, see [DOCKER.md](DOCKER.md).
### Option 2: Manual Installation ### Option 2: Manual Installation
#### Prerequisites #### Prerequisites
- [Node.js](https://nodejs.org/) (Version 20+ or 22+ recommended) - [Node.js](https://nodejs.org/) (Version 20+ or 22+ recommended)

View file

@ -1,71 +1,71 @@
services: services:
# Production frontend -- always runs # Production frontend -- always runs
monochrome: monochrome:
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: monochrome container_name: monochrome
ports: ports:
- "${MONOCHROME_PORT:-3000}:4173" - '${MONOCHROME_PORT:-3000}:4173'
restart: unless-stopped restart: unless-stopped
networks: networks:
- monochrome-network - monochrome-network
healthcheck: healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:4173/"] test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:4173/']
interval: 30s interval: 30s
timeout: 3s timeout: 3s
retries: 3 retries: 3
start_period: 5s start_period: 5s
# PocketBase backend -- only starts with: docker compose --profile pocketbase up -d # PocketBase backend -- only starts with: docker compose --profile pocketbase up -d
pocketbase: pocketbase:
image: ghcr.io/muchobien/pocketbase:latest image: ghcr.io/muchobien/pocketbase:latest
container_name: monochrome-pocketbase container_name: monochrome-pocketbase
profiles: profiles:
- pocketbase - pocketbase
restart: unless-stopped restart: unless-stopped
environment: environment:
PB_ADMIN_EMAIL: ${PB_ADMIN_EMAIL:-admin@example.com} PB_ADMIN_EMAIL: ${PB_ADMIN_EMAIL:-admin@example.com}
PB_ADMIN_PASSWORD: ${PB_ADMIN_PASSWORD:-changeme} PB_ADMIN_PASSWORD: ${PB_ADMIN_PASSWORD:-changeme}
TZ: ${TZ:-UTC} TZ: ${TZ:-UTC}
ports: ports:
- "${POCKETBASE_PORT:-8090}:8090" - '${POCKETBASE_PORT:-8090}:8090'
volumes: volumes:
- pb_data:/pb_data - pb_data:/pb_data
- pb_public:/pb_public - pb_public:/pb_public
- pb_hooks:/pb_hooks - pb_hooks:/pb_hooks
command: serve --http=0.0.0.0:8090 command: serve --http=0.0.0.0:8090
healthcheck: healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8090/api/health"] test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:8090/api/health']
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3
start_period: 30s start_period: 30s
networks: networks:
- monochrome-network - monochrome-network
# Development server -- only starts with: docker compose --profile dev up -d # Development server -- only starts with: docker compose --profile dev up -d
monochrome-dev: monochrome-dev:
build: build:
context: . context: .
dockerfile: Dockerfile.dev dockerfile: Dockerfile.dev
container_name: monochrome-dev container_name: monochrome-dev
profiles: profiles:
- dev - dev
ports: ports:
- "${MONOCHROME_DEV_PORT:-5173}:5173" - '${MONOCHROME_DEV_PORT:-5173}:5173'
volumes: volumes:
- .:/app - .:/app
- /app/node_modules - /app/node_modules
command: npm run dev -- --host 0.0.0.0 command: npm run dev -- --host 0.0.0.0
networks: networks:
- monochrome-network - monochrome-network
networks: networks:
monochrome-network: monochrome-network:
driver: bridge driver: bridge
volumes: volumes:
pb_data: pb_data:
pb_public: pb_public:
pb_hooks: pb_hooks: