Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
15a76d2
feat: Add server-level GPU support for Docker Swarm deployments and A…
vishalkadam47 Oct 17, 2024
e52a0fc
feat: Added Blender template
vishalkadam47 Oct 17, 2024
6d3ea8d
Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template
vishalkadam47 Oct 18, 2024
4334301
Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template
vishalkadam47 Oct 23, 2024
96c5176
Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template
vishalkadam47 Oct 24, 2024
5a440d9
fix: Remove privileged mode and seccomp option, update runtime to nvidia
vishalkadam47 Oct 24, 2024
b309269
Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template
vishalkadam47 Oct 24, 2024
3e46795
refactor: Update docker-compose.yml to remove port mapping and remove…
vishalkadam47 Oct 27, 2024
1b6d8d8
feat: Added GPU support feature for Remote Server with setup and stat…
vishalkadam47 Nov 2, 2024
ed7150f
fix: Remove unused imports and interfaces from gpu-setup.ts
vishalkadam47 Nov 2, 2024
bc097c7
fix: resolve merge conflicts with upstream/canary
vishalkadam47 Nov 2, 2024
7306d8c
feat: Add GPU configuration and Update import path for gpu-setup func…
vishalkadam47 Nov 3, 2024
3b5e892
Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template
vishalkadam47 Nov 5, 2024
b53da82
refactor: gpu support component and related api routers; update templ…
vishalkadam47 Nov 5, 2024
2e6d9c3
feat: add dokploy server gpu setup
vishalkadam47 Nov 6, 2024
a331020
Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template
vishalkadam47 Nov 6, 2024
c765d7d
Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template
vishalkadam47 Nov 7, 2024
0ca8ee1
feat(i18n): add i18n support
PaiJi Nov 7, 2024
7f0a92f
feat(i18n): add language select into appearance tab
PaiJi Nov 7, 2024
66c4d8f
refactor: gpu setup and status checks, extract functions, and improve…
vishalkadam47 Nov 7, 2024
046f0a5
feat(i18n): replace translation in Appearance
PaiJi Nov 8, 2024
c09ff25
feat(i18n): add translation for server tab
PaiJi Nov 9, 2024
b817b4b
refactor: gpu support and docker setup improvements
vishalkadam47 Nov 11, 2024
5f6d041
Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template
vishalkadam47 Nov 11, 2024
c5c3ca3
Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template
vishalkadam47 Nov 12, 2024
b6fd410
chore: add tag feature
Siumauricio Nov 12, 2024
5cf12e5
chore: remove name
Siumauricio Nov 12, 2024
fa08325
Merge branch 'Dokploy:canary' into feat/i18n-support
PaiJi Nov 12, 2024
b0f5e7d
Update CONTRIBUTING.md
Siumauricio Nov 12, 2024
a7165be
chore: set pull 665
Siumauricio Nov 12, 2024
96584e5
Update CONTRIBUTING.md
Siumauricio Nov 12, 2024
ed470ee
Add: Peppermint.sh
DrMxrcy Nov 12, 2024
88f9699
Add: Windmill.dev
DrMxrcy Nov 12, 2024
59c050b
Add: Activepieces
DrMxrcy Nov 12, 2024
0799f8e
Fix: Windmill Path
DrMxrcy Nov 12, 2024
4f092b2
Add: InvoiceShelf
DrMxrcy Nov 12, 2024
814580f
Add: Postiz
DrMxrcy Nov 12, 2024
faceed1
Add: Slash Template
DrMxrcy Nov 12, 2024
7b06fd4
Add: Linkstack
DrMxrcy Nov 12, 2024
5c17797
Add: Chatwoot
DrMxrcy Nov 12, 2024
deeea11
Add: Discord Tickets
DrMxrcy Nov 12, 2024
b376ead
feat(i18n): use flat translation key
PaiJi Nov 13, 2024
fb0308f
chore(config): add defaultI18nConfig to avoid state issue
PaiJi Nov 13, 2024
e57efa2
fix: AP Ports
DrMxrcy Nov 13, 2024
3457de4
fix: Chatwoot SSL Termination
DrMxrcy Nov 13, 2024
46219e1
fix: Caddyfile for Windmill
DrMxrcy Nov 13, 2024
8d33ff5
fix: Change Windmill Volume Path
DrMxrcy Nov 13, 2024
3d59e28
fix: ENV Variables in LinkStack
DrMxrcy Nov 13, 2024
69c9e86
fix: Windmill Caddyfile
DrMxrcy Nov 13, 2024
82afd48
fix: Chatwoot Setup Service
DrMxrcy Nov 13, 2024
7bef3a0
fix: ActivePieces ENV
DrMxrcy Nov 13, 2024
de31512
fix: Multiple Tests
DrMxrcy Nov 13, 2024
cab9443
fix: Remove LinkStack
DrMxrcy Nov 13, 2024
b5fa411
Add: Redis Password to AP
DrMxrcy Nov 13, 2024
8900e30
fix: Update Chatwoot Compose
DrMxrcy Nov 13, 2024
06af204
fix: Testing ENV Variables
DrMxrcy Nov 13, 2024
f1fc3f1
Update index.ts
DrMxrcy Nov 13, 2024
8157dd9
fix: More Config Fixes
DrMxrcy Nov 13, 2024
9b77573
fix: ENV Testing
DrMxrcy Nov 13, 2024
444302e
fix: chatwoot ENV
DrMxrcy Nov 13, 2024
6866c3b
fix: Envs
DrMxrcy Nov 13, 2024
a5c1f8e
fix: AP Env Testing
DrMxrcy Nov 13, 2024
fa79170
fix: chatwoot DB
DrMxrcy Nov 13, 2024
8e532d5
Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template
vishalkadam47 Nov 13, 2024
6961ee1
refactor: removed console logs and error handling
vishalkadam47 Nov 13, 2024
2492581
Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template
vishalkadam47 Nov 14, 2024
3eef4aa
refactor: removed sleep function and updated import
vishalkadam47 Nov 14, 2024
69a4a87
feat: add nextcloud-aio template
seppulcro Nov 14, 2024
1aaff05
feat: add nextcloud-aio template; fix utils usage for envs
seppulcro Nov 15, 2024
af84942
Merge pull request #590 from wish-oss/feature/gpu-support-blender-tem…
Siumauricio Nov 17, 2024
4c71d3a
Merge branch 'canary' into feat/nextcloud-aio-template
Siumauricio Nov 17, 2024
f4f1fc2
Merge pull request #705 from seppulcro/feat/nextcloud-aio-template
Siumauricio Nov 17, 2024
3a07d8d
Merge pull request #665 from PaiJi/feat/i18n-support
Siumauricio Nov 17, 2024
70ca219
Remove Chatwoot
DrMxrcy Nov 17, 2024
1e7d9fc
refactor(dokploy): add missing next-18next to dockerfile
Siumauricio Nov 17, 2024
9efd2e3
chore: change build i18N
Siumauricio Nov 17, 2024
d330405
chore: update dockerfile
Siumauricio Nov 17, 2024
036313e
chore: update dockerfile
Siumauricio Nov 17, 2024
01a8824
Add: Discord Tickets Logo
DrMxrcy Nov 17, 2024
2487e3e
Merge branch 'canary' into feat/new-templates
Siumauricio Nov 17, 2024
5833838
Merge pull request #691 from DrMxrcy/feat/new-templates
Siumauricio Nov 17, 2024
b1f7d05
Merge branch 'canary' into fix/build-i18n
Siumauricio Nov 17, 2024
56ea356
refactor(dokploy): update i18next build
Siumauricio Nov 17, 2024
4e929c1
chore: add missing next config to dockerfile
Siumauricio Nov 17, 2024
74374bd
feat: add update server ip
kdurek Nov 17, 2024
bd55e37
Merge branch 'canary' of https://github.com/kdurek/dokploy into feat/…
kdurek Nov 17, 2024
2835c99
feat: update to use multi language
kdurek Nov 17, 2024
f7fa8e7
Merge pull request #713 from Dokploy/fix/build-i18n
Siumauricio Nov 17, 2024
3015d69
feat: add polish translation
kdurek Nov 17, 2024
6af5742
fix(i18n): quick fix for locale cookie expire when browser close
PaiJi Nov 17, 2024
4bf5e5c
fix(dokploy): remove $ on presets redirect
Siumauricio Nov 17, 2024
3c490ba
Merge pull request #717 from Dokploy/712-redirect-feature-not-working
Siumauricio Nov 17, 2024
8236721
feat: add ability for setting current public IP in server IP update form
kdurek Nov 17, 2024
f138b09
feat: add Polish language support to appearance settings and locale c…
kdurek Nov 17, 2024
04235fb
Merge branch 'canary' of https://github.com/kdurek/dokploy into feat/…
kdurek Nov 17, 2024
7003fe7
feat: add shared enviroment variables
Siumauricio Nov 17, 2024
2f175f0
refactor: add missing types
Siumauricio Nov 17, 2024
2307346
refactor: add validation to prevent run on cloud
Siumauricio Nov 18, 2024
173110a
Merge pull request #714 from kdurek/feat/server-ip
Siumauricio Nov 18, 2024
ce2dce3
refactor: update shared to project
Siumauricio Nov 18, 2024
b73889d
Merge pull request #719 from Dokploy/443-implement-coolifyio-like-sup…
Siumauricio Nov 18, 2024
ddbb414
chore(version): bump version
Siumauricio Nov 18, 2024
a6e7edd
refactor: update share to project
Siumauricio Nov 18, 2024
5db5336
Merge pull request #716 from PaiJi/fix/storage-locale-setting-in-loca…
Siumauricio Nov 18, 2024
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
19 changes: 16 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ jobs:
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_TOKEN
if [ "${CIRCLE_BRANCH}" == "main" ]; then
TAG="latest"
else
elif [ "${CIRCLE_BRANCH}" == "canary" ]; then
TAG="canary"
else
TAG="feature"
fi
docker build --platform linux/amd64 -t dokploy/dokploy:${TAG}-amd64 .
docker push dokploy/dokploy:${TAG}-amd64
Expand All @@ -41,8 +43,10 @@ jobs:
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_TOKEN
if [ "${CIRCLE_BRANCH}" == "main" ]; then
TAG="latest"
else
elif [ "${CIRCLE_BRANCH}" == "canary" ]; then
TAG="canary"
else
TAG="feature"
fi
docker build --platform linux/arm64 -t dokploy/dokploy:${TAG}-arm64 .
docker push dokploy/dokploy:${TAG}-arm64
Expand Down Expand Up @@ -72,12 +76,18 @@ jobs:
dokploy/dokploy:${TAG}-amd64 \
dokploy/dokploy:${TAG}-arm64
docker manifest push dokploy/dokploy:${VERSION}
else
elif [ "${CIRCLE_BRANCH}" == "canary" ]; then
TAG="canary"
docker manifest create dokploy/dokploy:${TAG} \
dokploy/dokploy:${TAG}-amd64 \
dokploy/dokploy:${TAG}-arm64
docker manifest push dokploy/dokploy:${TAG}
else
TAG="feature"
docker manifest create dokploy/dokploy:${TAG} \
dokploy/dokploy:${TAG}-amd64 \
dokploy/dokploy:${TAG}-arm64
docker manifest push dokploy/dokploy:${TAG}
fi

workflows:
Expand All @@ -89,12 +99,14 @@ workflows:
only:
- main
- canary
- fix/build-i18n
- build-arm64:
filters:
branches:
only:
- main
- canary
- fix/build-i18n
- combine-manifests:
requires:
- build-amd64
Expand All @@ -104,3 +116,4 @@ workflows:
only:
- main
- canary
- fix/build-i18n
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ We have a few guidelines to follow when contributing to this project:

## Commit Convention


Before you create a Pull Request, please make sure your commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.

### Commit Message Format


```
<type>[optional scope]: <description>

Expand Down Expand Up @@ -235,7 +237,7 @@ export function generate(schema: Schema): Template {

5. Add the logo or image of the template to `public/templates/plausible.svg`

### Recomendations
### Recommendations

- Use the same name of the folder as the id of the template.
- The logo should be in the public folder.
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ RUN apt-get update && apt-get install -y curl unzip apache2-utils && rm -rf /var
COPY --from=build /prod/dokploy/.next ./.next
COPY --from=build /prod/dokploy/dist ./dist
COPY --from=build /prod/dokploy/next.config.mjs ./next.config.mjs
COPY --from=build /prod/dokploy/next-i18next.config.cjs ./next-i18next.config.cjs
COPY --from=build /prod/dokploy/public ./public
COPY --from=build /prod/dokploy/package.json ./package.json
COPY --from=build /prod/dokploy/drizzle ./drizzle
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.cloud
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN apt-get update && apt-get install -y curl unzip apache2-utils && rm -rf /var
COPY --from=build /prod/dokploy/.next ./.next
COPY --from=build /prod/dokploy/dist ./dist
COPY --from=build /prod/dokploy/next.config.mjs ./next.config.mjs
COPY --from=build /prod/dokploy/next-i18next.config.cjs ./next-i18next.config.cjs
COPY --from=build /prod/dokploy/public ./public
COPY --from=build /prod/dokploy/package.json ./package.json
COPY --from=build /prod/dokploy/drizzle ./drizzle
Expand Down
8 changes: 8 additions & 0 deletions apps/dokploy/__test__/drop/drop.test.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ const baseApp: ApplicationNested = {
serverId: "",
branch: null,
dockerBuildStage: "",
project: {
env: "",
adminId: "",
name: "",
description: "",
createdAt: "",
projectId: "",
},
buildArgs: null,
buildPath: "/",
gitlabPathNamespace: "",
Expand Down
179 changes: 179 additions & 0 deletions apps/dokploy/__test__/env/shared.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
import { prepareEnvironmentVariables } from "@dokploy/server/index";
import { describe, expect, it } from "vitest";

const projectEnv = `
ENVIRONMENT=staging
DATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db
PORT=3000
`;
const serviceEnv = `
ENVIRONMENT=\${{project.ENVIRONMENT}}
DATABASE_URL=\${{project.DATABASE_URL}}
SERVICE_PORT=4000
`;

describe("prepareEnvironmentVariables", () => {
it("resolves project variables correctly", () => {
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);

expect(resolved).toEqual([
"ENVIRONMENT=staging",
"DATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db",
"SERVICE_PORT=4000",
]);
});

it("handles undefined project variables", () => {
const incompleteProjectEnv = `
NODE_ENV=production
`;

const invalidServiceEnv = `
UNDEFINED_VAR=\${{project.UNDEFINED_VAR}}
`;

expect(
() =>
prepareEnvironmentVariables(invalidServiceEnv, incompleteProjectEnv), // Cambiado el orden
).toThrow("Invalid project environment variable: project.UNDEFINED_VAR");
});
it("allows service-specific variables to override project variables", () => {
const serviceSpecificEnv = `
ENVIRONMENT=production
DATABASE_URL=\${{project.DATABASE_URL}}
`;

const resolved = prepareEnvironmentVariables(
serviceSpecificEnv,
projectEnv,
);

expect(resolved).toEqual([
"ENVIRONMENT=production", // Overrides project variable
"DATABASE_URL=postgres://postgres:postgres@localhost:5432/project_db",
]);
});

it("resolves complex references for dynamic endpoints", () => {
const projectEnv = `
BASE_URL=https://api.example.com
API_VERSION=v1
PORT=8000
`;
const serviceEnv = `
API_ENDPOINT=\${{project.BASE_URL}}/\${{project.API_VERSION}}/endpoint
SERVICE_PORT=9000
`;
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);

expect(resolved).toEqual([
"API_ENDPOINT=https://api.example.com/v1/endpoint",
"SERVICE_PORT=9000",
]);
});

it("handles missing project variables gracefully", () => {
const projectEnv = `
PORT=8080
`;
const serviceEnv = `
MISSING_VAR=\${{project.MISSING_KEY}}
SERVICE_PORT=3000
`;

expect(() => prepareEnvironmentVariables(serviceEnv, projectEnv)).toThrow(
"Invalid project environment variable: project.MISSING_KEY",
);
});

it("overrides project variables with service-specific values", () => {
const projectEnv = `
ENVIRONMENT=staging
DATABASE_URL=postgres://project:project@localhost:5432/project_db
`;
const serviceEnv = `
ENVIRONMENT=\${{project.ENVIRONMENT}}
DATABASE_URL=postgres://service:service@localhost:5432/service_db
SERVICE_NAME=my-service
`;
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);

expect(resolved).toEqual([
"ENVIRONMENT=staging",
"DATABASE_URL=postgres://service:service@localhost:5432/service_db",
"SERVICE_NAME=my-service",
]);
});

it("handles project variables with normal and unusual characters", () => {
const projectEnv = `
ENVIRONMENT=PRODUCTION
`;

// Needs to be in quotes
const serviceEnv = `
NODE_ENV=\${{project.ENVIRONMENT}}
SPECIAL_VAR="$^@$^@#$^@!#$@#$-\${{project.ENVIRONMENT}}"
`;

const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);

expect(resolved).toEqual([
"NODE_ENV=PRODUCTION",
"SPECIAL_VAR=$^@$^@#$^@!#$@#$-PRODUCTION",
]);
});

it("handles complex cases with multiple references, special characters, and spaces", () => {
const projectEnv = `
ENVIRONMENT=STAGING
APP_NAME=MyApp
`;

const serviceEnv = `
NODE_ENV=\${{project.ENVIRONMENT}}
COMPLEX_VAR="Prefix-$#^!@-\${{project.ENVIRONMENT}}--\${{project.APP_NAME}} Suffix "
`;
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);

expect(resolved).toEqual([
"NODE_ENV=STAGING",
"COMPLEX_VAR=Prefix-$#^!@-STAGING--MyApp Suffix ",
]);
});

it("handles references enclosed in single quotes", () => {
const projectEnv = `
ENVIRONMENT=STAGING
APP_NAME=MyApp
`;

const serviceEnv = `
NODE_ENV='\${{project.ENVIRONMENT}}'
COMPLEX_VAR='Prefix-$#^!@-\${{project.ENVIRONMENT}}--\${{project.APP_NAME}} Suffix'
`;
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);

expect(resolved).toEqual([
"NODE_ENV=STAGING",
"COMPLEX_VAR=Prefix-$#^!@-STAGING--MyApp Suffix",
]);
});

it("handles double and single quotes combined", () => {
const projectEnv = `
ENVIRONMENT=PRODUCTION
APP_NAME=MyApp
`;
const serviceEnv = `
NODE_ENV="'\${{project.ENVIRONMENT}}'"
COMPLEX_VAR="'Prefix \"DoubleQuoted\" and \${{project.APP_NAME}}'"
`;
const resolved = prepareEnvironmentVariables(serviceEnv, projectEnv);

expect(resolved).toEqual([
"NODE_ENV='PRODUCTION'",
"COMPLEX_VAR='Prefix \"DoubleQuoted\" and MyApp'",
]);
});
});
8 changes: 8 additions & 0 deletions apps/dokploy/__test__/traefik/traefik.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ const baseApp: ApplicationNested = {
branch: null,
dockerBuildStage: "",
buildArgs: null,
project: {
env: "",
adminId: "",
name: "",
description: "",
createdAt: "",
projectId: "",
},
buildPath: "/",
gitlabPathNamespace: "",
buildType: "nixpacks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const redirectPresets = [
redirect: {
regex: "^https?://(?:www.)?(.+)",
permanent: true,
replacement: "https://www.$${1}",
replacement: "https://www.${1}",
},
},
{
Expand All @@ -70,7 +70,7 @@ const redirectPresets = [
redirect: {
regex: "^https?://www.(.+)",
permanent: true,
replacement: "https://$${1}",
replacement: "https://${1}",
},
},
];
Expand Down
Loading
Loading