Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.git
.github
**/.turbo
**/.react-router
**/.wrangler
**/worker-configuration.d.ts
**/.env.local
**/.env.*.local
**/.env.production
**/.dev.vars
**/*.tsbuildinfo
**/*.env
**/node_modules
**/dist
**/generated
**/coverage
39 changes: 10 additions & 29 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,6 @@ concurrency:
cancel-in-progress: true

jobs:
web-legacy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.5.0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --filter web...
- name: Build app
run: pnpm run build --filter web...
env:
VITE_COMMIT_SHA: ${{ github.sha }}
MERGEABLE_GITHUB_URLS: https://api.github.com
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }}
accountId: 1f74b8302712fd67d5eddea8c96eb776
projectName: mergeable
workingDirectory: apps/web
directory: dist/client
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
web:
runs-on: ubuntu-latest
steps:
Expand All @@ -51,7 +24,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.5.0
node-version: 23.11.0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
Expand All @@ -77,7 +50,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.5.0
node-version: 23.11.0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
Expand All @@ -97,6 +70,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 23.11.0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Publish to Cloudflare Workers
Expand All @@ -112,6 +89,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 23.11.0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.5.0
node-version: 23.11.0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Cosign
Expand Down Expand Up @@ -48,7 +48,8 @@ jobs:
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: apps/web
context: .
file: apps/web/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.5.0
node-version: 23.11.0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
Expand All @@ -24,7 +24,6 @@ jobs:
- name: Run tests with coverage
run: pnpm coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
POLLY_MODE: offline
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pnpm-debug.log*
# Typescript
*.tsbuildinfo
node_modules/
build/
coverage/
dist/
generated/
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
auto-install-peers = true
use-node-version=23.11.0
2 changes: 1 addition & 1 deletion apps/docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ hero:
- text: Learn More
link: ./overview/
variant: secondary
- text: Get Started Now
- text: Get Started
link: https://app.usemergeable.dev
icon: right-caret
editUrl: false
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/content/docs/self-host/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ Using the Docker image is recommended for simple setups, e.g., when deploying di
The Docker image can be started with the following command:

```bash
docker run -d -p 8080:80 ghcr.io/pvcnt/mergeable
docker run -d -p 3000:3000 ghcr.io/pvcnt/mergeable
```

The Web UI will then be available at http://localhost:8080.
The Web UI will then be available at http://localhost:3000.

The above command starts the latest published image from the main branch.
You may refer to a specific commit by using the sha1 of the target commit as the image tag, e.g.:

```bash
docker run -d -p 8080:80 ghcr.io/pvcnt/mergeable:259cfbd2a855d72094f7dcecd8d08cc427d3e1c9
docker run -d -p 3000:3000 ghcr.io/pvcnt/mergeable:259cfbd2a855d72094f7dcecd8d08cc427d3e1c9
```

## Configuration

Mergeable can be configured [using environment variables](../environment-variables/), e.g.:

```bash
docker run -d -p 8080:80 -e MERGEABLE_GITHUB_URLS=https://api.github.com ghcr.io/pvcnt/mergeable
docker run -d -p 3000:3000 -e MERGEABLE_GITHUB_URLS=https://api.github.com ghcr.io/pvcnt/mergeable
```
1 change: 0 additions & 1 deletion apps/docs/src/content/docs/self-host/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ The following deployment methods are currently supported:
| ------------------------ | ------------------------------------- |
| [Docker image](./docker) | Local testing, bare metal, VMs, PaaS. |
| [Helm chart](./helm) | Kubernetes cluster. |
| [Static files](./static) | Static website hosting platform. |
31 changes: 0 additions & 31 deletions apps/docs/src/content/docs/self-host/static-files.md

This file was deleted.

3 changes: 0 additions & 3 deletions apps/web/.dockerignore

This file was deleted.

58 changes: 36 additions & 22 deletions apps/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
# syntax=docker/dockerfile:1.8.1

FROM joseluisq/static-web-server:2.32.0-alpine
FROM node:23 AS base

RUN apk add --no-cache envsubst
COPY --chmod=0755 docker/entrypoint.sh /
RUN corepack enable pnpm

COPY <<EOF /config.toml
[general]
ENV PNPM_HOME=/app/.pnpm
ENV PATH=$PNPM_HOME:$PATH
ENV CI=1
ENV TURBO_TELEMETRY_DISABLED=1

host = "::"
port = 80
root = "/mergeable"
log-level = "info"
WORKDIR /src

page-fallback = "/mergeable/index.html"
cache-control-headers = true
compression = true
security-headers = true
directory-listing = false
redirect-trailing-slash = true
compression-static = true
ignore-hidden-files = true
EOF
FROM base AS pruner

COPY ./dist/client /mergeable
RUN pnpm install --global turbo@^2

ENV SERVER_CONFIG_FILE=config.toml
COPY . .
RUN turbo prune web --docker

ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 80
FROM base AS builder

COPY --from=pruner /src/out/json/ .
RUN pnpm install --frozen-lockfile

COPY --from=pruner /src/out/full/ .
RUN NODE_ENV=production pnpm run build

FROM base AS runtime

ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini
RUN chmod +x /tini

COPY --from=pruner /src/out/json/ .
RUN pnpm install --frozen-lockfile --prod

COPY --from=builder /src/apps/web/dist /src/apps/web/dist
COPY --from=builder /src/apps/web/server /src/apps/web/server

WORKDIR /src/apps/web
EXPOSE 3000

ENTRYPOINT ["/tini", "-g", "--"]

CMD ["node", "server/node.ts"]
9 changes: 0 additions & 9 deletions apps/web/cloudflare/worker.ts

This file was deleted.

16 changes: 13 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"dev": "react-router dev",
"build": "react-router build",
"preview": "vite preview",
"start:node": "node server/node.ts",
"start:worker": "wrangler dev",
"typecheck": "tsc -b",
"lint": "eslint \"src/**/*.{ts,tsx}\"",
"codegen": "react-router typegen && wrangler types && graphql-codegen --config ./codegen.ts",
Expand All @@ -18,6 +20,7 @@
"@blueprintjs/icons": "^5.22.0",
"@blueprintjs/select": "^5.3.20",
"@graphql-typed-document-node/core": "^3.2.0",
"@hono/node-server": "^1.14.2",
"@octokit/plugin-throttling": "^11.0.1",
"@react-router/node": "^7.6.0",
"@tanstack/react-query": "^5.75.4",
Expand All @@ -28,30 +31,35 @@
"dexie": "^4.0.9",
"dexie-react-hooks": "^1.1.7",
"graphql": "^16.11.0",
"hono": "^4.7.10",
"idb-keyval": "^6.2.1",
"isbot": "^5.1.28",
"javascript-time-ago": "^2.5.10",
"localforage": "^1.10.0",
"normalize.css": "^8.0.1",
"octokit": "^5.0.2",
"pino": "^9.7.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router": "^7.6.0",
"react-time-ago": "^7.3.3",
"remeda": "^2.0.5",
"source-map-support": "^0.5.21",
"std-env": "^3.9.0",
"usehooks-ts": "^3.1.1",
"uuid": "^10.0.0"
"uuid": "^10.0.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@codecov/vite-plugin": "^1.9.0",
"@cloudflare/vite-plugin": "^1.2.2",
"@graphql-codegen/cli": "^5.0.5",
"@pollyjs/adapter-fetch": "^6.0.6",
"@pollyjs/core": "^6.0.6",
"@pollyjs/persister-fs": "^6.0.6",
"@react-router/dev": "^7.6.0",
"@react-router/serve": "^7.6.0",
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@repo/vite-plugin-process-env": "workspace:*",
"@tanstack/eslint-plugin-query": "^5.74.7",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
Expand All @@ -60,6 +68,7 @@
"@types/node": "^22.5.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/source-map-support": "^0.5.10",
"@vitest/coverage-istanbul": "^2.0.5",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
Expand All @@ -72,6 +81,7 @@
"typescript": "^5.5.4",
"typescript-plugin-css-modules": "^5.1.0",
"vite": "^6.3.5",
"vite-plugin-iso-import": "^1.2.0",
"vitest": "^2.0.5",
"wrangler": "^4.14.4"
}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/react-router.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import type { Config } from "@react-router/dev/config";
export default {
appDirectory: "src",
buildDirectory: "dist",
ssr: false,
ssr: true,
} satisfies Config;
Loading