Skip to content

Commit 5b6d80e

Browse files
authored
Merge pull request #3682 from Dokploy/canary
🚀 Release v0.27.1
2 parents 2c9ca65 + c688311 commit 5b6d80e

99 files changed

Lines changed: 19518 additions & 3841 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Dockerfile for DevContainer
2+
FROM node:20.16.0-bullseye-slim
3+
4+
# Install essential packages
5+
RUN apt-get update && apt-get install -y \
6+
curl \
7+
bash \
8+
git \
9+
&& apt-get clean \
10+
&& rm -rf /var/lib/apt/lists/*
11+
12+
# Set up PNPM
13+
ENV PNPM_HOME="/pnpm"
14+
ENV PATH="$PNPM_HOME:$PATH"
15+
RUN corepack enable && corepack prepare pnpm@9.12.0 --activate
16+
17+
# Create workspace directory
18+
WORKDIR /workspaces/dokploy
19+
20+
# Set up user permissions
21+
USER node

.devcontainer/devcontainer.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "Dokploy development container",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": ".."
6+
},
7+
"features": {
8+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
9+
"moby": true,
10+
"version": "latest"
11+
},
12+
"ghcr.io/devcontainers/features/git:1": {
13+
"ppa": true,
14+
"version": "latest"
15+
},
16+
"ghcr.io/devcontainers/features/go:1": {
17+
"version": "1.20"
18+
}
19+
},
20+
"customizations": {
21+
"vscode": {
22+
"extensions": [
23+
"ms-vscode.vscode-typescript-next",
24+
"bradlc.vscode-tailwindcss",
25+
"ms-vscode.vscode-json",
26+
"biomejs.biome",
27+
"golang.go",
28+
"redhat.vscode-xml",
29+
"github.vscode-github-actions",
30+
"github.copilot",
31+
"github.copilot-chat"
32+
]
33+
}
34+
},
35+
"forwardPorts": [3000, 5432, 6379],
36+
"portsAttributes": {
37+
"3000": {
38+
"label": "Dokploy App",
39+
"onAutoForward": "notify"
40+
},
41+
"5432": {
42+
"label": "PostgreSQL",
43+
"onAutoForward": "silent"
44+
},
45+
"6379": {
46+
"label": "Redis",
47+
"onAutoForward": "silent"
48+
}
49+
},
50+
"remoteUser": "node",
51+
"workspaceFolder": "/workspaces/dokploy",
52+
"runArgs": ["--name", "dokploy-devcontainer"]
53+
}

.github/workflows/pr-quality.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
name: PR Quality
3+
4+
permissions:
5+
contents: read
6+
issues: read
7+
pull-requests: write
8+
9+
on:
10+
pull_request_target:
11+
types: [opened, reopened]
12+
13+
jobs:
14+
anti-slop:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: peakoss/anti-slop@v0
18+
with:
19+
max-failures: 4
20+
blocked-commit-authors: "claude,copilot"
21+
require-description: true
22+
min-account-age: 5

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,4 @@ yarn-error.log*
4343
*.pem
4444

4545

46-
.db
47-
48-
# Development environment
49-
.devcontainer
46+
.db

apps/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"react": "18.2.0",
2121
"react-dom": "18.2.0",
2222
"redis": "4.7.0",
23-
"zod": "^3.25.32"
23+
"zod": "^3.25.76"
2424
},
2525
"devDependencies": {
2626
"@types/node": "^20.16.0",

apps/dokploy/__test__/deploy/github.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ describe("GitHub Webhook Skip CI", () => {
8383
{ commits: [{ message: "[skip ci] test" }] },
8484
),
8585
).toBe("[skip ci] test");
86+
87+
// Soft Serve
88+
expect(
89+
extractCommitMessage(
90+
{ "x-softserve-event": "push" },
91+
{ commits: [{ message: "[skip ci] test" }] },
92+
),
93+
).toBe("[skip ci] test");
8694
});
8795

8896
it("should handle missing commit message", () => {
@@ -99,6 +107,9 @@ describe("GitHub Webhook Skip CI", () => {
99107
expect(extractCommitMessage({ "x-gitea-event": "push" }, {})).toBe(
100108
"NEW COMMIT",
101109
);
110+
expect(extractCommitMessage({ "x-softserve-event": "push" }, {})).toBe(
111+
"NEW COMMIT",
112+
);
102113
});
103114
});
104115

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { describe, expect, it } from "vitest";
2+
import {
3+
extractBranchName,
4+
extractCommitMessage,
5+
extractHash,
6+
getProviderByHeader,
7+
} from "@/pages/api/deploy/[refreshToken]";
8+
9+
describe("Soft Serve Webhook", () => {
10+
const mockSoftServeHeaders = {
11+
"x-softserve-event": "push",
12+
};
13+
14+
const createMockBody = (message: string, hash: string, branch: string) => ({
15+
event: "push",
16+
ref: `refs/heads/${branch}`,
17+
after: hash,
18+
commits: [{ message: message }],
19+
});
20+
const message: string = "feat: add new feature";
21+
const hash: string = "3c91c24ef9560bddc695bce138bf8a7094ec3df5";
22+
const branch: string = "feat/add-new";
23+
const goodWebhook = createMockBody(message, hash, branch);
24+
25+
it("should properly extract the provider name", () => {
26+
expect(getProviderByHeader(mockSoftServeHeaders)).toBe("soft-serve");
27+
});
28+
29+
it("should properly extract the commit message", () => {
30+
expect(extractCommitMessage(mockSoftServeHeaders, goodWebhook)).toBe(
31+
message,
32+
);
33+
});
34+
35+
it("should properly extract hash", () => {
36+
expect(extractHash(mockSoftServeHeaders, goodWebhook)).toBe(hash);
37+
});
38+
39+
it("should properly extract branch name", () => {
40+
expect(extractBranchName(mockSoftServeHeaders, goodWebhook)).toBe(branch);
41+
});
42+
43+
it("should gracefully handle invalid webhook", () => {
44+
expect(getProviderByHeader({})).toBeNull();
45+
expect(extractCommitMessage(mockSoftServeHeaders, {})).toBe("NEW COMMIT");
46+
expect(extractHash(mockSoftServeHeaders, {})).toBe("NEW COMMIT");
47+
expect(extractBranchName(mockSoftServeHeaders, {})).toBeNull();
48+
});
49+
});

0 commit comments

Comments
 (0)