From 701580afc45092fbe4c5699ccfd91b8ddaf1513c Mon Sep 17 00:00:00 2001 From: Ikko Eltociear Ashimine Date: Fri, 3 May 2024 00:54:14 +0900 Subject: [PATCH 01/14] fix: typo in index.ts DOKERFILE -> DOCKERFILE --- server/utils/builders/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/utils/builders/index.ts b/server/utils/builders/index.ts index 9d0cf8da4..f952ab867 100644 --- a/server/utils/builders/index.ts +++ b/server/utils/builders/index.ts @@ -17,7 +17,7 @@ import { buildPaketo } from "./paketo"; // NIXPACKS codeDirectory = where is the path of the code directory // HEROKU codeDirectory = where is the path of the code directory // PAKETO codeDirectory = where is the path of the code directory -// DOKERFILE codeDirectory = where is the exact path of the (Dockerfile) +// DOCKERFILE codeDirectory = where is the exact path of the (Dockerfile) export type ApplicationNested = InferResultType< "applications", { mounts: true; security: true; redirects: true; ports: true } From eebe071a4329f4d824ca4724865b7644cb46ab98 Mon Sep 17 00:00:00 2001 From: Marius Ihring <89946878+mariusihring@users.noreply.github.com> Date: Fri, 3 May 2024 20:16:32 +0200 Subject: [PATCH 02/14] Update build.sh Updating build, so it gets build for arm64 aarch64 and the normal x86, using buildx --- docker/build.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docker/build.sh b/docker/build.sh index 22104934d..5b65a6f5b 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -10,9 +10,16 @@ else TAG="$VERSION" fi -docker build --platform linux/amd64 --pull --rm -f 'Dockerfile' -t "dokploy/dokploy:${TAG}" . +# Ensure Docker's buildx plugin is being used and set as the default builder +BUILDER=$(docker buildx create --use) + +# Build and push the images for different architectures +docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' --push . if [ "$BUILD_TYPE" != "canary" ]; then - # Tag the production build as latest - docker tag "dokploy/dokploy:${TAG}" "dokploy/dokploy:latest" + # Tag the production build as latest for all architectures and push + docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:latest" -f 'Dockerfile' --push . fi + +# Clean up the buildx builder instance +docker buildx rm $BUILDER From 59bd46908f4cf169f30a17a72f91ed7e9f673895 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 4 May 2024 02:19:35 -0600 Subject: [PATCH 03/14] chore: remove --push flag --- docker/build.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/docker/build.sh b/docker/build.sh index 5b65a6f5b..e0e5b14a9 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -10,16 +10,8 @@ else TAG="$VERSION" fi -# Ensure Docker's buildx plugin is being used and set as the default builder BUILDER=$(docker buildx create --use) -# Build and push the images for different architectures -docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' --push . +docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' . -if [ "$BUILD_TYPE" != "canary" ]; then - # Tag the production build as latest for all architectures and push - docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:latest" -f 'Dockerfile' --push . -fi - -# Clean up the buildx builder instance docker buildx rm $BUILDER From c8150f4f3201df455246b5fbeeae56806e6e08a0 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 4 May 2024 02:19:48 -0600 Subject: [PATCH 04/14] refactor: add buildx multiplatform and --push --- docker/push.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/push.sh b/docker/push.sh index 1e9fbecaf..f8a7055ca 100755 --- a/docker/push.sh +++ b/docker/push.sh @@ -3,13 +3,16 @@ # Determine the type of build based on the first script argument BUILD_TYPE=${1:-production} +BUILDER=$(docker buildx create --use) + if [ "$BUILD_TYPE" == "canary" ]; then TAG="canary" echo PUSHING CANARY - docker push "dokploy/dokploy:${TAG}" + docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' --push . else echo "PUSHING PRODUCTION" VERSION=$(node -p "require('./package.json').version") - docker push "dokploy/dokploy:${VERSION}" - docker push "dokploy/dokploy:latest" + docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:latest" -t "dokploy/dokploy:${VERSION}" -f 'Dockerfile' --push . fi + +docker buildx rm $BUILDER \ No newline at end of file From c6581f73ffb2c46c1ed7947aacf1bfc490818211 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 4 May 2024 02:20:31 -0600 Subject: [PATCH 05/14] chore: downgrade nextjs to 13.2.4 to support arm/v7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 258f32bf7..101dd3e63 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "lucia": "^3.0.1", "lucide-react": "^0.312.0", "nanoid": "3", - "next": "^14.1.3", + "next": "^13.2.4", "next-themes": "^0.2.1", "node-os-utils": "1.3.7", "node-pty": "1.0.0", From ca54084793a24915fedf0a50955d25fbece6a9ab Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 4 May 2024 02:20:47 -0600 Subject: [PATCH 06/14] chore: remove build script on push --- .github/workflows/pull-request.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 51e36ede7..cd28143d3 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -75,7 +75,5 @@ jobs: - name: Build and push Docker image using custom script run: | - chmod +x ./docker/build.sh chmod +x ./docker/push.sh - ./docker/build.sh ${{ github.ref_name == 'canary' && 'canary' || '' }} ./docker/push.sh ${{ github.ref_name == 'canary' && 'canary' || '' }} \ No newline at end of file From c5f7f8bad60a155019956ebdded41c30d78d2dd8 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 4 May 2024 02:20:59 -0600 Subject: [PATCH 07/14] chore: update dependencies --- next.config.mjs | 5 --- pnpm-lock.yaml | 96 +++++++++++++++++++++++++++---------------------- 2 files changed, 54 insertions(+), 47 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 95e4a206d..3dc0f83c7 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -6,11 +6,6 @@ /** @type {import("next").NextConfig} */ const nextConfig = { reactStrictMode: true, - logging:{ - fetches:{ - fullUrl:false - } - }, /** * If you are using `appDir` then you must comment the below `i18n` config out. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 21d314ee7..f8fa596c4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -85,7 +85,7 @@ dependencies: version: 10.45.2(@trpc/server@10.45.2) '@trpc/next': specifier: ^10.43.6 - version: 10.45.2(@tanstack/react-query@4.36.1)(@trpc/client@10.45.2)(@trpc/react-query@10.45.2)(@trpc/server@10.45.2)(next@14.1.3)(react-dom@18.2.0)(react@18.2.0) + version: 10.45.2(@tanstack/react-query@4.36.1)(@trpc/client@10.45.2)(@trpc/react-query@10.45.2)(@trpc/server@10.45.2)(next@13.5.6)(react-dom@18.2.0)(react@18.2.0) '@trpc/react-query': specifier: ^10.43.6 version: 10.45.2(@tanstack/react-query@4.36.1)(@trpc/client@10.45.2)(@trpc/server@10.45.2)(react-dom@18.2.0)(react@18.2.0) @@ -156,11 +156,11 @@ dependencies: specifier: '3' version: 3.3.7 next: - specifier: ^14.1.3 - version: 14.1.3(react-dom@18.2.0)(react@18.2.0) + specifier: ^13.2.4 + version: 13.5.6(react-dom@18.2.0)(react@18.2.0) next-themes: specifier: ^0.2.1 - version: 0.2.1(next@14.1.3)(react-dom@18.2.0)(react@18.2.0) + version: 0.2.1(next@13.5.6)(react-dom@18.2.0)(react@18.2.0) node-os-utils: specifier: 1.3.7 version: 1.3.7 @@ -1853,12 +1853,12 @@ packages: dev: false optional: true - /@next/env@14.1.3: - resolution: {integrity: sha512-VhgXTvrgeBRxNPjyfBsDIMvgsKDxjlpw4IAUsHCX8Gjl1vtHUYRT3+xfQ/wwvLPDd/6kqfLqk9Pt4+7gysuCKQ==} + /@next/env@13.5.6: + resolution: {integrity: sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw==} dev: false - /@next/swc-darwin-arm64@14.1.3: - resolution: {integrity: sha512-LALu0yIBPRiG9ANrD5ncB3pjpO0Gli9ZLhxdOu6ZUNf3x1r3ea1rd9Q+4xxUkGrUXLqKVK9/lDkpYIJaCJ6AHQ==} + /@next/swc-darwin-arm64@13.5.6: + resolution: {integrity: sha512-5nvXMzKtZfvcu4BhtV0KH1oGv4XEW+B+jOfmBdpFI3C7FrB/MfujRpWYSBBO64+qbW8pkZiSyQv9eiwnn5VIQA==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1866,8 +1866,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64@14.1.3: - resolution: {integrity: sha512-E/9WQeXxkqw2dfcn5UcjApFgUq73jqNKaE5bysDm58hEUdUGedVrnRhblhJM7HbCZNhtVl0j+6TXsK0PuzXTCg==} + /@next/swc-darwin-x64@13.5.6: + resolution: {integrity: sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1875,8 +1875,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu@14.1.3: - resolution: {integrity: sha512-USArX9B+3rZSXYLFvgy0NVWQgqh6LHWDmMt38O4lmiJNQcwazeI6xRvSsliDLKt+78KChVacNiwvOMbl6g6BBw==} + /@next/swc-linux-arm64-gnu@13.5.6: + resolution: {integrity: sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1884,8 +1884,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl@14.1.3: - resolution: {integrity: sha512-esk1RkRBLSIEp1qaQXv1+s6ZdYzuVCnDAZySpa62iFTMGTisCyNQmqyCTL9P+cLJ4N9FKCI3ojtSfsyPHJDQNw==} + /@next/swc-linux-arm64-musl@13.5.6: + resolution: {integrity: sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1893,8 +1893,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu@14.1.3: - resolution: {integrity: sha512-8uOgRlYEYiKo0L8YGeS+3TudHVDWDjPVDUcST+z+dUzgBbTEwSSIaSgF/vkcC1T/iwl4QX9iuUyUdQEl0Kxalg==} + /@next/swc-linux-x64-gnu@13.5.6: + resolution: {integrity: sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1902,8 +1902,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl@14.1.3: - resolution: {integrity: sha512-DX2zqz05ziElLoxskgHasaJBREC5Y9TJcbR2LYqu4r7naff25B4iXkfXWfcp69uD75/0URmmoSgT8JclJtrBoQ==} + /@next/swc-linux-x64-musl@13.5.6: + resolution: {integrity: sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1911,8 +1911,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc@14.1.3: - resolution: {integrity: sha512-HjssFsCdsD4GHstXSQxsi2l70F/5FsRTRQp8xNgmQs15SxUfUJRvSI9qKny/jLkY3gLgiCR3+6A7wzzK0DBlfA==} + /@next/swc-win32-arm64-msvc@13.5.6: + resolution: {integrity: sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -1920,8 +1920,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc@14.1.3: - resolution: {integrity: sha512-DRuxD5axfDM1/Ue4VahwSxl1O5rn61hX8/sF0HY8y0iCbpqdxw3rB3QasdHn/LJ6Wb2y5DoWzXcz3L1Cr+Thrw==} + /@next/swc-win32-ia32-msvc@13.5.6: + resolution: {integrity: sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -1929,8 +1929,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc@14.1.3: - resolution: {integrity: sha512-uC2DaDoWH7h1P/aJ4Fok3Xiw6P0Lo4ez7NbowW2VGNXw/Xv6tOuLUcxhBYZxsSUJtpeknCi8/fvnSpyCFp4Rcg==} + /@next/swc-win32-x64-msvc@13.5.6: + resolution: {integrity: sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -4184,7 +4184,7 @@ packages: '@trpc/server': 10.45.2 dev: false - /@trpc/next@10.45.2(@tanstack/react-query@4.36.1)(@trpc/client@10.45.2)(@trpc/react-query@10.45.2)(@trpc/server@10.45.2)(next@14.1.3)(react-dom@18.2.0)(react@18.2.0): + /@trpc/next@10.45.2(@tanstack/react-query@4.36.1)(@trpc/client@10.45.2)(@trpc/react-query@10.45.2)(@trpc/server@10.45.2)(next@13.5.6)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-RSORmfC+/nXdmRY1pQ0AalsVgSzwNAFbZLYHiTvPM5QQ8wmMEHilseCYMXpu0se/TbPt9zVR6Ka2d7O6zxKkXg==} peerDependencies: '@tanstack/react-query': ^4.18.0 @@ -4199,7 +4199,7 @@ packages: '@trpc/client': 10.45.2(@trpc/server@10.45.2) '@trpc/react-query': 10.45.2(@tanstack/react-query@4.36.1)(@trpc/client@10.45.2)(@trpc/server@10.45.2)(react-dom@18.2.0)(react@18.2.0) '@trpc/server': 10.45.2 - next: 14.1.3(react-dom@18.2.0)(react@18.2.0) + next: 13.5.6(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false @@ -5619,6 +5619,10 @@ packages: dependencies: is-glob: 4.0.3 + /glob-to-regexp@0.4.1: + resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} + dev: false + /glob@10.3.10: resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} engines: {node: '>=16 || 14 >=14.17'} @@ -6182,14 +6186,14 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - /next-themes@0.2.1(next@14.1.3)(react-dom@18.2.0)(react@18.2.0): + /next-themes@0.2.1(next@13.5.6)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==} peerDependencies: next: '*' react: '*' react-dom: '*' dependencies: - next: 14.1.3(react-dom@18.2.0)(react@18.2.0) + next: 13.5.6(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false @@ -6198,9 +6202,9 @@ packages: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} dev: true - /next@14.1.3(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-oexgMV2MapI0UIWiXKkixF8J8ORxpy64OuJ/J9oVUmIthXOUCcuVEZX+dtpgq7wIfIqtBwQsKEDXejcjTsan9g==} - engines: {node: '>=18.17.0'} + /next@13.5.6(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw==} + engines: {node: '>=16.14.0'} hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 @@ -6213,25 +6217,25 @@ packages: sass: optional: true dependencies: - '@next/env': 14.1.3 + '@next/env': 13.5.6 '@swc/helpers': 0.5.2 busboy: 1.6.0 caniuse-lite: 1.0.30001598 - graceful-fs: 4.2.11 postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) styled-jsx: 5.1.1(react@18.2.0) + watchpack: 2.4.0 optionalDependencies: - '@next/swc-darwin-arm64': 14.1.3 - '@next/swc-darwin-x64': 14.1.3 - '@next/swc-linux-arm64-gnu': 14.1.3 - '@next/swc-linux-arm64-musl': 14.1.3 - '@next/swc-linux-x64-gnu': 14.1.3 - '@next/swc-linux-x64-musl': 14.1.3 - '@next/swc-win32-arm64-msvc': 14.1.3 - '@next/swc-win32-ia32-msvc': 14.1.3 - '@next/swc-win32-x64-msvc': 14.1.3 + '@next/swc-darwin-arm64': 13.5.6 + '@next/swc-darwin-x64': 13.5.6 + '@next/swc-linux-arm64-gnu': 13.5.6 + '@next/swc-linux-arm64-musl': 13.5.6 + '@next/swc-linux-x64-gnu': 13.5.6 + '@next/swc-linux-x64-musl': 13.5.6 + '@next/swc-win32-arm64-msvc': 13.5.6 + '@next/swc-win32-ia32-msvc': 13.5.6 + '@next/swc-win32-x64-msvc': 13.5.6 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -7343,6 +7347,14 @@ packages: d3-timer: 3.0.1 dev: false + /watchpack@2.4.0: + resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==} + engines: {node: '>=10.13.0'} + dependencies: + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + dev: false + /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: false From 1b6d4273ccf20ab05ef2b7b7eecccaf462408dd3 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 4 May 2024 10:55:05 -0600 Subject: [PATCH 08/14] fix: prevent to have empty traefik config in order to prevent domain crashes #38 --- server/api/routers/domain.ts | 2 +- server/api/services/application.ts | 3 +-- server/utils/traefik/domain.ts | 13 +++++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/server/api/routers/domain.ts b/server/api/routers/domain.ts index 2abe710c3..ace938c01 100644 --- a/server/api/routers/domain.ts +++ b/server/api/routers/domain.ts @@ -52,7 +52,7 @@ export const domainRouter = createTRPCRouter({ .mutation(async ({ input }) => { const domain = await findDomainById(input.domainId); const result = await removeDomainById(input.domainId); - removeDomain(domain.application.appName, domain.uniqueConfigKey); + await removeDomain(domain.application.appName, domain.uniqueConfigKey); return result; }), diff --git a/server/api/services/application.ts b/server/api/services/application.ts index d7efc4339..d5da79c40 100644 --- a/server/api/services/application.ts +++ b/server/api/services/application.ts @@ -36,9 +36,8 @@ export const createApplication = async ( }); } - createTraefikConfig(newApplication.appName); - if (process.env.NODE_ENV === "development") { + createTraefikConfig(newApplication.appName); await tx.insert(domains).values({ applicationId: newApplication.applicationId, host: `${newApplication.appName}.docker.localhost`, diff --git a/server/utils/traefik/domain.ts b/server/utils/traefik/domain.ts index cf0faa17e..689afbbb9 100644 --- a/server/utils/traefik/domain.ts +++ b/server/utils/traefik/domain.ts @@ -1,6 +1,7 @@ import { createServiceConfig, loadOrCreateConfig, + removeTraefikConfig, writeTraefikConfig, } from "./application"; import type { ApplicationNested } from "../builders"; @@ -23,7 +24,7 @@ export const manageDomain = async (app: ApplicationNested, domain: Domain) => { writeTraefikConfig(config, appName); }; -export const removeDomain = (appName: string, uniqueKey: number) => { +export const removeDomain = async (appName: string, uniqueKey: number) => { const config: FileConfig = loadOrCreateConfig(appName); const routerKey = `${appName}-router-${uniqueKey}`; @@ -35,7 +36,15 @@ export const removeDomain = (appName: string, uniqueKey: number) => { delete config.http.services[serviceKey]; } - writeTraefikConfig(config, appName); + // verify if is the last router if so we delete the router + if ( + config?.http?.routers && + Object.keys(config?.http?.routers).length === 0 + ) { + await removeTraefikConfig(appName); + } else { + writeTraefikConfig(config, appName); + } }; export const createRouterConfig = async ( From 0d3d700e4c72b9ed99f6ef2f14f6014068a76dfd Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 4 May 2024 12:42:39 -0600 Subject: [PATCH 09/14] revert: back to next 14 and remove arm/v7 due to unsuported versions from nextjs side --- docker/build.sh | 2 +- docker/push.sh | 4 +- package.json | 2 +- pnpm-lock.yaml | 110 +++++++++++++++++++++++------------------------- 4 files changed, 57 insertions(+), 61 deletions(-) diff --git a/docker/build.sh b/docker/build.sh index e0e5b14a9..ef38fa4fa 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -12,6 +12,6 @@ fi BUILDER=$(docker buildx create --use) -docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' . +docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' . docker buildx rm $BUILDER diff --git a/docker/push.sh b/docker/push.sh index f8a7055ca..1c41f68aa 100755 --- a/docker/push.sh +++ b/docker/push.sh @@ -8,11 +8,11 @@ BUILDER=$(docker buildx create --use) if [ "$BUILD_TYPE" == "canary" ]; then TAG="canary" echo PUSHING CANARY - docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' --push . + docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' --push . else echo "PUSHING PRODUCTION" VERSION=$(node -p "require('./package.json').version") - docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:latest" -t "dokploy/dokploy:${VERSION}" -f 'Dockerfile' --push . + docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t "dokploy/dokploy:latest" -t "dokploy/dokploy:${VERSION}" -f 'Dockerfile' --push . fi docker buildx rm $BUILDER \ No newline at end of file diff --git a/package.json b/package.json index 101dd3e63..258f32bf7 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "lucia": "^3.0.1", "lucide-react": "^0.312.0", "nanoid": "3", - "next": "^13.2.4", + "next": "^14.1.3", "next-themes": "^0.2.1", "node-os-utils": "1.3.7", "node-pty": "1.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f8fa596c4..61d1677b7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -85,7 +85,7 @@ dependencies: version: 10.45.2(@trpc/server@10.45.2) '@trpc/next': specifier: ^10.43.6 - version: 10.45.2(@tanstack/react-query@4.36.1)(@trpc/client@10.45.2)(@trpc/react-query@10.45.2)(@trpc/server@10.45.2)(next@13.5.6)(react-dom@18.2.0)(react@18.2.0) + version: 10.45.2(@tanstack/react-query@4.36.1)(@trpc/client@10.45.2)(@trpc/react-query@10.45.2)(@trpc/server@10.45.2)(next@14.2.3)(react-dom@18.2.0)(react@18.2.0) '@trpc/react-query': specifier: ^10.43.6 version: 10.45.2(@tanstack/react-query@4.36.1)(@trpc/client@10.45.2)(@trpc/server@10.45.2)(react-dom@18.2.0)(react@18.2.0) @@ -156,11 +156,11 @@ dependencies: specifier: '3' version: 3.3.7 next: - specifier: ^13.2.4 - version: 13.5.6(react-dom@18.2.0)(react@18.2.0) + specifier: ^14.1.3 + version: 14.2.3(react-dom@18.2.0)(react@18.2.0) next-themes: specifier: ^0.2.1 - version: 0.2.1(next@13.5.6)(react-dom@18.2.0)(react@18.2.0) + version: 0.2.1(next@14.2.3)(react-dom@18.2.0)(react@18.2.0) node-os-utils: specifier: 1.3.7 version: 1.3.7 @@ -1853,12 +1853,12 @@ packages: dev: false optional: true - /@next/env@13.5.6: - resolution: {integrity: sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw==} + /@next/env@14.2.3: + resolution: {integrity: sha512-W7fd7IbkfmeeY2gXrzJYDx8D2lWKbVoTIj1o1ScPHNzvp30s1AuoEFSdr39bC5sjxJaxTtq3OTCZboNp0lNWHA==} dev: false - /@next/swc-darwin-arm64@13.5.6: - resolution: {integrity: sha512-5nvXMzKtZfvcu4BhtV0KH1oGv4XEW+B+jOfmBdpFI3C7FrB/MfujRpWYSBBO64+qbW8pkZiSyQv9eiwnn5VIQA==} + /@next/swc-darwin-arm64@14.2.3: + resolution: {integrity: sha512-3pEYo/RaGqPP0YzwnlmPN2puaF2WMLM3apt5jLW2fFdXD9+pqcoTzRk+iZsf8ta7+quAe4Q6Ms0nR0SFGFdS1A==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1866,8 +1866,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64@13.5.6: - resolution: {integrity: sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA==} + /@next/swc-darwin-x64@14.2.3: + resolution: {integrity: sha512-6adp7waE6P1TYFSXpY366xwsOnEXM+y1kgRpjSRVI2CBDOcbRjsJ67Z6EgKIqWIue52d2q/Mx8g9MszARj8IEA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1875,8 +1875,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu@13.5.6: - resolution: {integrity: sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg==} + /@next/swc-linux-arm64-gnu@14.2.3: + resolution: {integrity: sha512-cuzCE/1G0ZSnTAHJPUT1rPgQx1w5tzSX7POXSLaS7w2nIUJUD+e25QoXD/hMfxbsT9rslEXugWypJMILBj/QsA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1884,8 +1884,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl@13.5.6: - resolution: {integrity: sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q==} + /@next/swc-linux-arm64-musl@14.2.3: + resolution: {integrity: sha512-0D4/oMM2Y9Ta3nGuCcQN8jjJjmDPYpHX9OJzqk42NZGJocU2MqhBq5tWkJrUQOQY9N+In9xOdymzapM09GeiZw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1893,8 +1893,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu@13.5.6: - resolution: {integrity: sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw==} + /@next/swc-linux-x64-gnu@14.2.3: + resolution: {integrity: sha512-ENPiNnBNDInBLyUU5ii8PMQh+4XLr4pG51tOp6aJ9xqFQ2iRI6IH0Ds2yJkAzNV1CfyagcyzPfROMViS2wOZ9w==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1902,8 +1902,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl@13.5.6: - resolution: {integrity: sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ==} + /@next/swc-linux-x64-musl@14.2.3: + resolution: {integrity: sha512-BTAbq0LnCbF5MtoM7I/9UeUu/8ZBY0i8SFjUMCbPDOLv+un67e2JgyN4pmgfXBwy/I+RHu8q+k+MCkDN6P9ViQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1911,8 +1911,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc@13.5.6: - resolution: {integrity: sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg==} + /@next/swc-win32-arm64-msvc@14.2.3: + resolution: {integrity: sha512-AEHIw/dhAMLNFJFJIJIyOFDzrzI5bAjI9J26gbO5xhAKHYTZ9Or04BesFPXiAYXDNdrwTP2dQceYA4dL1geu8A==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -1920,8 +1920,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc@13.5.6: - resolution: {integrity: sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg==} + /@next/swc-win32-ia32-msvc@14.2.3: + resolution: {integrity: sha512-vga40n1q6aYb0CLrM+eEmisfKCR45ixQYXuBXxOOmmoV8sYST9k7E3US32FsY+CkkF7NtzdcebiFT4CHuMSyZw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -1929,8 +1929,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc@13.5.6: - resolution: {integrity: sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ==} + /@next/swc-win32-x64-msvc@14.2.3: + resolution: {integrity: sha512-Q1/zm43RWynxrO7lW4ehciQVj+5ePBhOK+/K2P7pLFX3JaJ/IZVC69SHidrmZSOkqz7ECIOhhy7XhAFG4JYyHA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -4124,9 +4124,14 @@ packages: tslib: 2.6.2 dev: false - /@swc/helpers@0.5.2: - resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} + /@swc/counter@0.1.3: + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + dev: false + + /@swc/helpers@0.5.5: + resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} dependencies: + '@swc/counter': 0.1.3 tslib: 2.6.2 dev: false @@ -4184,7 +4189,7 @@ packages: '@trpc/server': 10.45.2 dev: false - /@trpc/next@10.45.2(@tanstack/react-query@4.36.1)(@trpc/client@10.45.2)(@trpc/react-query@10.45.2)(@trpc/server@10.45.2)(next@13.5.6)(react-dom@18.2.0)(react@18.2.0): + /@trpc/next@10.45.2(@tanstack/react-query@4.36.1)(@trpc/client@10.45.2)(@trpc/react-query@10.45.2)(@trpc/server@10.45.2)(next@14.2.3)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-RSORmfC+/nXdmRY1pQ0AalsVgSzwNAFbZLYHiTvPM5QQ8wmMEHilseCYMXpu0se/TbPt9zVR6Ka2d7O6zxKkXg==} peerDependencies: '@tanstack/react-query': ^4.18.0 @@ -4199,7 +4204,7 @@ packages: '@trpc/client': 10.45.2(@trpc/server@10.45.2) '@trpc/react-query': 10.45.2(@tanstack/react-query@4.36.1)(@trpc/client@10.45.2)(@trpc/server@10.45.2)(react-dom@18.2.0)(react@18.2.0) '@trpc/server': 10.45.2 - next: 13.5.6(react-dom@18.2.0)(react@18.2.0) + next: 14.2.3(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false @@ -5619,10 +5624,6 @@ packages: dependencies: is-glob: 4.0.3 - /glob-to-regexp@0.4.1: - resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} - dev: false - /glob@10.3.10: resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} engines: {node: '>=16 || 14 >=14.17'} @@ -6186,14 +6187,14 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - /next-themes@0.2.1(next@13.5.6)(react-dom@18.2.0)(react@18.2.0): + /next-themes@0.2.1(next@14.2.3)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==} peerDependencies: next: '*' react: '*' react-dom: '*' dependencies: - next: 13.5.6(react-dom@18.2.0)(react@18.2.0) + next: 14.2.3(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false @@ -6202,40 +6203,43 @@ packages: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} dev: true - /next@13.5.6(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw==} - engines: {node: '>=16.14.0'} + /next@14.2.3(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-dowFkFTR8v79NPJO4QsBUtxv0g9BrS/phluVpMAt2ku7H+cbcBJlopXjkWlwxrk/xGqMemr7JkGPGemPrLLX7A==} + engines: {node: '>=18.17.0'} hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 + '@playwright/test': ^1.41.2 react: ^18.2.0 react-dom: ^18.2.0 sass: ^1.3.0 peerDependenciesMeta: '@opentelemetry/api': optional: true + '@playwright/test': + optional: true sass: optional: true dependencies: - '@next/env': 13.5.6 - '@swc/helpers': 0.5.2 + '@next/env': 14.2.3 + '@swc/helpers': 0.5.5 busboy: 1.6.0 caniuse-lite: 1.0.30001598 + graceful-fs: 4.2.11 postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) styled-jsx: 5.1.1(react@18.2.0) - watchpack: 2.4.0 optionalDependencies: - '@next/swc-darwin-arm64': 13.5.6 - '@next/swc-darwin-x64': 13.5.6 - '@next/swc-linux-arm64-gnu': 13.5.6 - '@next/swc-linux-arm64-musl': 13.5.6 - '@next/swc-linux-x64-gnu': 13.5.6 - '@next/swc-linux-x64-musl': 13.5.6 - '@next/swc-win32-arm64-msvc': 13.5.6 - '@next/swc-win32-ia32-msvc': 13.5.6 - '@next/swc-win32-x64-msvc': 13.5.6 + '@next/swc-darwin-arm64': 14.2.3 + '@next/swc-darwin-x64': 14.2.3 + '@next/swc-linux-arm64-gnu': 14.2.3 + '@next/swc-linux-arm64-musl': 14.2.3 + '@next/swc-linux-x64-gnu': 14.2.3 + '@next/swc-linux-x64-musl': 14.2.3 + '@next/swc-win32-arm64-msvc': 14.2.3 + '@next/swc-win32-ia32-msvc': 14.2.3 + '@next/swc-win32-x64-msvc': 14.2.3 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -7347,14 +7351,6 @@ packages: d3-timer: 3.0.1 dev: false - /watchpack@2.4.0: - resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==} - engines: {node: '>=10.13.0'} - dependencies: - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - dev: false - /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: false From 3990c39471ddc2620de12627721b8fea7c401b06 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 4 May 2024 13:22:04 -0600 Subject: [PATCH 10/14] refactor: remove build on PR due to hight build time --- .github/workflows/pull-request.yml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index cd28143d3..02d9bce92 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -31,28 +31,6 @@ jobs: - name: Run Build run: pnpm build - - build-docker-on-pr: - if: github.event_name == 'pull_request' - needs: build-app - runs-on: ubuntu-latest - steps: - - name: Check out the code - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Prepare .env file - run: | - cp .env.production.example .env.production - - - name: Run custom Docker build script - run: | - chmod +x ./docker/build.sh - echo "Building Docker image for ${{ github.base_ref }}" - ./docker/build.sh ${{ github.base_ref == 'canary' && 'canary' || '' }} - build-and-push-docker-on-push: if: github.event_name == 'push' runs-on: ubuntu-latest From 0055a8322f80fb068d888757a19e2d7d6839df22 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 5 May 2024 03:53:48 -0600 Subject: [PATCH 11/14] fix(#42): initialize the database as a first service --- server/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/server.ts b/server/server.ts index 20af88ade..cc2bd042e 100644 --- a/server/server.ts +++ b/server/server.ts @@ -48,9 +48,9 @@ void app.prepare().then(async () => { await initializeNetwork(); createDefaultTraefikConfig(); createDefaultServerTraefikConfig(); + await initializePostgres(); await initializeTraefik(); await initializeRedis(); - await initializePostgres(); initCronJobs(); welcomeServer(); From b167e592d3b45cae036a7b8f02219b00dcf7b47a Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 5 May 2024 04:09:27 -0600 Subject: [PATCH 12/14] refactor: add circle.yml --- .github/workflows/circle.yml | 61 ++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/circle.yml diff --git a/.github/workflows/circle.yml b/.github/workflows/circle.yml new file mode 100644 index 000000000..145480c22 --- /dev/null +++ b/.github/workflows/circle.yml @@ -0,0 +1,61 @@ +version: 2.1 + +orbs: + node: circleci/node@5.0.0 + docker: circleci/docker@2.1.1 + +workflows: + version: 2 + build-and-deploy: + jobs: + - build-app: + filters: + branches: + only: + - main + - canary + context: + - pnpm + - build-and-push-docker-on-push: + filters: + branches: + only: + - main + - canary + context: + - docker + +jobs: + build-app: + docker: + - image: cimg/node:18.18.0 + steps: + - checkout + - node/install: + install-yarn: false + install-npm: false + node-version: "18.18.0" + - run: npm install -g pnpm@8 + - run: pnpm install + - run: pnpm build + + build-and-push-docker-on-push: + docker: + - image: cimg/base:stable + steps: + - checkout + - setup_remote_docker: + docker_layer_caching: true + - docker/check: + - docker/login: + username: DOCKERHUB_USERNAME + password: DOCKERHUB_TOKEN + - run: + name: Prepare .env file + command: | + cp .env.production.example .env.production + - run: + name: Build and push Docker image using custom script + command: | + chmod +x ./docker/push.sh + ./docker/push.sh ${CIRCLE_BRANCH == 'canary' && echo 'canary' || echo ''} From 505fc3efff87dc855d25df787f6bca298f8f0575 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 5 May 2024 11:52:43 -0600 Subject: [PATCH 13/14] chore: upgrade version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 258f32bf7..9afbe835e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dokploy", - "version": "v0.0.1", + "version": "v0.0.2", "private": true, "license": "AGPL-3.0-only", "type": "module", From 237a01d7ae354d9f0b5d5d59fe170981b258a9ab Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 5 May 2024 11:53:36 -0600 Subject: [PATCH 14/14] remove file --- .github/workflows/circle.yml | 61 ------------------------------------ 1 file changed, 61 deletions(-) delete mode 100644 .github/workflows/circle.yml diff --git a/.github/workflows/circle.yml b/.github/workflows/circle.yml deleted file mode 100644 index 145480c22..000000000 --- a/.github/workflows/circle.yml +++ /dev/null @@ -1,61 +0,0 @@ -version: 2.1 - -orbs: - node: circleci/node@5.0.0 - docker: circleci/docker@2.1.1 - -workflows: - version: 2 - build-and-deploy: - jobs: - - build-app: - filters: - branches: - only: - - main - - canary - context: - - pnpm - - build-and-push-docker-on-push: - filters: - branches: - only: - - main - - canary - context: - - docker - -jobs: - build-app: - docker: - - image: cimg/node:18.18.0 - steps: - - checkout - - node/install: - install-yarn: false - install-npm: false - node-version: "18.18.0" - - run: npm install -g pnpm@8 - - run: pnpm install - - run: pnpm build - - build-and-push-docker-on-push: - docker: - - image: cimg/base:stable - steps: - - checkout - - setup_remote_docker: - docker_layer_caching: true - - docker/check: - - docker/login: - username: DOCKERHUB_USERNAME - password: DOCKERHUB_TOKEN - - run: - name: Prepare .env file - command: | - cp .env.production.example .env.production - - run: - name: Build and push Docker image using custom script - command: | - chmod +x ./docker/push.sh - ./docker/push.sh ${CIRCLE_BRANCH == 'canary' && echo 'canary' || echo ''}