mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
24
.github/workflows/pull-request.yml
vendored
24
.github/workflows/pull-request.yml
vendored
@@ -31,28 +31,6 @@ jobs:
|
|||||||
- name: Run Build
|
- name: Run Build
|
||||||
run: pnpm 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:
|
build-and-push-docker-on-push:
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -75,7 +53,5 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and push Docker image using custom script
|
- name: Build and push Docker image using custom script
|
||||||
run: |
|
run: |
|
||||||
chmod +x ./docker/build.sh
|
|
||||||
chmod +x ./docker/push.sh
|
chmod +x ./docker/push.sh
|
||||||
./docker/build.sh ${{ github.ref_name == 'canary' && 'canary' || '' }}
|
|
||||||
./docker/push.sh ${{ github.ref_name == 'canary' && 'canary' || '' }}
|
./docker/push.sh ${{ github.ref_name == 'canary' && 'canary' || '' }}
|
||||||
@@ -10,9 +10,8 @@ else
|
|||||||
TAG="$VERSION"
|
TAG="$VERSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker build --platform linux/amd64 --pull --rm -f 'Dockerfile' -t "dokploy/dokploy:${TAG}" .
|
BUILDER=$(docker buildx create --use)
|
||||||
|
|
||||||
if [ "$BUILD_TYPE" != "canary" ]; then
|
docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' .
|
||||||
# Tag the production build as latest
|
|
||||||
docker tag "dokploy/dokploy:${TAG}" "dokploy/dokploy:latest"
|
docker buildx rm $BUILDER
|
||||||
fi
|
|
||||||
|
|||||||
@@ -3,13 +3,16 @@
|
|||||||
# Determine the type of build based on the first script argument
|
# Determine the type of build based on the first script argument
|
||||||
BUILD_TYPE=${1:-production}
|
BUILD_TYPE=${1:-production}
|
||||||
|
|
||||||
|
BUILDER=$(docker buildx create --use)
|
||||||
|
|
||||||
if [ "$BUILD_TYPE" == "canary" ]; then
|
if [ "$BUILD_TYPE" == "canary" ]; then
|
||||||
TAG="canary"
|
TAG="canary"
|
||||||
echo PUSHING CANARY
|
echo PUSHING CANARY
|
||||||
docker push "dokploy/dokploy:${TAG}"
|
docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' --push .
|
||||||
else
|
else
|
||||||
echo "PUSHING PRODUCTION"
|
echo "PUSHING PRODUCTION"
|
||||||
VERSION=$(node -p "require('./package.json').version")
|
VERSION=$(node -p "require('./package.json').version")
|
||||||
docker push "dokploy/dokploy:${VERSION}"
|
docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t "dokploy/dokploy:latest" -t "dokploy/dokploy:${VERSION}" -f 'Dockerfile' --push .
|
||||||
docker push "dokploy/dokploy:latest"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
docker buildx rm $BUILDER
|
||||||
@@ -6,11 +6,6 @@
|
|||||||
/** @type {import("next").NextConfig} */
|
/** @type {import("next").NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
logging:{
|
|
||||||
fetches:{
|
|
||||||
fullUrl:false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If you are using `appDir` then you must comment the below `i18n` config out.
|
* If you are using `appDir` then you must comment the below `i18n` config out.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dokploy",
|
"name": "dokploy",
|
||||||
"version": "v0.0.1",
|
"version": "v0.0.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
92
pnpm-lock.yaml
generated
92
pnpm-lock.yaml
generated
@@ -85,7 +85,7 @@ dependencies:
|
|||||||
version: 10.45.2(@trpc/server@10.45.2)
|
version: 10.45.2(@trpc/server@10.45.2)
|
||||||
'@trpc/next':
|
'@trpc/next':
|
||||||
specifier: ^10.43.6
|
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@14.2.3)(react-dom@18.2.0)(react@18.2.0)
|
||||||
'@trpc/react-query':
|
'@trpc/react-query':
|
||||||
specifier: ^10.43.6
|
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)
|
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)
|
||||||
@@ -157,10 +157,10 @@ dependencies:
|
|||||||
version: 3.3.7
|
version: 3.3.7
|
||||||
next:
|
next:
|
||||||
specifier: ^14.1.3
|
specifier: ^14.1.3
|
||||||
version: 14.1.3(react-dom@18.2.0)(react@18.2.0)
|
version: 14.2.3(react-dom@18.2.0)(react@18.2.0)
|
||||||
next-themes:
|
next-themes:
|
||||||
specifier: ^0.2.1
|
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@14.2.3)(react-dom@18.2.0)(react@18.2.0)
|
||||||
node-os-utils:
|
node-os-utils:
|
||||||
specifier: 1.3.7
|
specifier: 1.3.7
|
||||||
version: 1.3.7
|
version: 1.3.7
|
||||||
@@ -1853,12 +1853,12 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/env@14.1.3:
|
/@next/env@14.2.3:
|
||||||
resolution: {integrity: sha512-VhgXTvrgeBRxNPjyfBsDIMvgsKDxjlpw4IAUsHCX8Gjl1vtHUYRT3+xfQ/wwvLPDd/6kqfLqk9Pt4+7gysuCKQ==}
|
resolution: {integrity: sha512-W7fd7IbkfmeeY2gXrzJYDx8D2lWKbVoTIj1o1ScPHNzvp30s1AuoEFSdr39bC5sjxJaxTtq3OTCZboNp0lNWHA==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@next/swc-darwin-arm64@14.1.3:
|
/@next/swc-darwin-arm64@14.2.3:
|
||||||
resolution: {integrity: sha512-LALu0yIBPRiG9ANrD5ncB3pjpO0Gli9ZLhxdOu6ZUNf3x1r3ea1rd9Q+4xxUkGrUXLqKVK9/lDkpYIJaCJ6AHQ==}
|
resolution: {integrity: sha512-3pEYo/RaGqPP0YzwnlmPN2puaF2WMLM3apt5jLW2fFdXD9+pqcoTzRk+iZsf8ta7+quAe4Q6Ms0nR0SFGFdS1A==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
@@ -1866,8 +1866,8 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-darwin-x64@14.1.3:
|
/@next/swc-darwin-x64@14.2.3:
|
||||||
resolution: {integrity: sha512-E/9WQeXxkqw2dfcn5UcjApFgUq73jqNKaE5bysDm58hEUdUGedVrnRhblhJM7HbCZNhtVl0j+6TXsK0PuzXTCg==}
|
resolution: {integrity: sha512-6adp7waE6P1TYFSXpY366xwsOnEXM+y1kgRpjSRVI2CBDOcbRjsJ67Z6EgKIqWIue52d2q/Mx8g9MszARj8IEA==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
@@ -1875,8 +1875,8 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-linux-arm64-gnu@14.1.3:
|
/@next/swc-linux-arm64-gnu@14.2.3:
|
||||||
resolution: {integrity: sha512-USArX9B+3rZSXYLFvgy0NVWQgqh6LHWDmMt38O4lmiJNQcwazeI6xRvSsliDLKt+78KChVacNiwvOMbl6g6BBw==}
|
resolution: {integrity: sha512-cuzCE/1G0ZSnTAHJPUT1rPgQx1w5tzSX7POXSLaS7w2nIUJUD+e25QoXD/hMfxbsT9rslEXugWypJMILBj/QsA==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
@@ -1884,8 +1884,8 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-linux-arm64-musl@14.1.3:
|
/@next/swc-linux-arm64-musl@14.2.3:
|
||||||
resolution: {integrity: sha512-esk1RkRBLSIEp1qaQXv1+s6ZdYzuVCnDAZySpa62iFTMGTisCyNQmqyCTL9P+cLJ4N9FKCI3ojtSfsyPHJDQNw==}
|
resolution: {integrity: sha512-0D4/oMM2Y9Ta3nGuCcQN8jjJjmDPYpHX9OJzqk42NZGJocU2MqhBq5tWkJrUQOQY9N+In9xOdymzapM09GeiZw==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
@@ -1893,8 +1893,8 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-linux-x64-gnu@14.1.3:
|
/@next/swc-linux-x64-gnu@14.2.3:
|
||||||
resolution: {integrity: sha512-8uOgRlYEYiKo0L8YGeS+3TudHVDWDjPVDUcST+z+dUzgBbTEwSSIaSgF/vkcC1T/iwl4QX9iuUyUdQEl0Kxalg==}
|
resolution: {integrity: sha512-ENPiNnBNDInBLyUU5ii8PMQh+4XLr4pG51tOp6aJ9xqFQ2iRI6IH0Ds2yJkAzNV1CfyagcyzPfROMViS2wOZ9w==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
@@ -1902,8 +1902,8 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-linux-x64-musl@14.1.3:
|
/@next/swc-linux-x64-musl@14.2.3:
|
||||||
resolution: {integrity: sha512-DX2zqz05ziElLoxskgHasaJBREC5Y9TJcbR2LYqu4r7naff25B4iXkfXWfcp69uD75/0URmmoSgT8JclJtrBoQ==}
|
resolution: {integrity: sha512-BTAbq0LnCbF5MtoM7I/9UeUu/8ZBY0i8SFjUMCbPDOLv+un67e2JgyN4pmgfXBwy/I+RHu8q+k+MCkDN6P9ViQ==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
@@ -1911,8 +1911,8 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-win32-arm64-msvc@14.1.3:
|
/@next/swc-win32-arm64-msvc@14.2.3:
|
||||||
resolution: {integrity: sha512-HjssFsCdsD4GHstXSQxsi2l70F/5FsRTRQp8xNgmQs15SxUfUJRvSI9qKny/jLkY3gLgiCR3+6A7wzzK0DBlfA==}
|
resolution: {integrity: sha512-AEHIw/dhAMLNFJFJIJIyOFDzrzI5bAjI9J26gbO5xhAKHYTZ9Or04BesFPXiAYXDNdrwTP2dQceYA4dL1geu8A==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
@@ -1920,8 +1920,8 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-win32-ia32-msvc@14.1.3:
|
/@next/swc-win32-ia32-msvc@14.2.3:
|
||||||
resolution: {integrity: sha512-DRuxD5axfDM1/Ue4VahwSxl1O5rn61hX8/sF0HY8y0iCbpqdxw3rB3QasdHn/LJ6Wb2y5DoWzXcz3L1Cr+Thrw==}
|
resolution: {integrity: sha512-vga40n1q6aYb0CLrM+eEmisfKCR45ixQYXuBXxOOmmoV8sYST9k7E3US32FsY+CkkF7NtzdcebiFT4CHuMSyZw==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [ia32]
|
cpu: [ia32]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
@@ -1929,8 +1929,8 @@ packages:
|
|||||||
dev: false
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-win32-x64-msvc@14.1.3:
|
/@next/swc-win32-x64-msvc@14.2.3:
|
||||||
resolution: {integrity: sha512-uC2DaDoWH7h1P/aJ4Fok3Xiw6P0Lo4ez7NbowW2VGNXw/Xv6tOuLUcxhBYZxsSUJtpeknCi8/fvnSpyCFp4Rcg==}
|
resolution: {integrity: sha512-Q1/zm43RWynxrO7lW4ehciQVj+5ePBhOK+/K2P7pLFX3JaJ/IZVC69SHidrmZSOkqz7ECIOhhy7XhAFG4JYyHA==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
@@ -4124,9 +4124,14 @@ packages:
|
|||||||
tslib: 2.6.2
|
tslib: 2.6.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@swc/helpers@0.5.2:
|
/@swc/counter@0.1.3:
|
||||||
resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==}
|
resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/@swc/helpers@0.5.5:
|
||||||
|
resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
'@swc/counter': 0.1.3
|
||||||
tslib: 2.6.2
|
tslib: 2.6.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
@@ -4184,7 +4189,7 @@ packages:
|
|||||||
'@trpc/server': 10.45.2
|
'@trpc/server': 10.45.2
|
||||||
dev: false
|
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@14.2.3)(react-dom@18.2.0)(react@18.2.0):
|
||||||
resolution: {integrity: sha512-RSORmfC+/nXdmRY1pQ0AalsVgSzwNAFbZLYHiTvPM5QQ8wmMEHilseCYMXpu0se/TbPt9zVR6Ka2d7O6zxKkXg==}
|
resolution: {integrity: sha512-RSORmfC+/nXdmRY1pQ0AalsVgSzwNAFbZLYHiTvPM5QQ8wmMEHilseCYMXpu0se/TbPt9zVR6Ka2d7O6zxKkXg==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@tanstack/react-query': ^4.18.0
|
'@tanstack/react-query': ^4.18.0
|
||||||
@@ -4199,7 +4204,7 @@ packages:
|
|||||||
'@trpc/client': 10.45.2(@trpc/server@10.45.2)
|
'@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/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
|
'@trpc/server': 10.45.2
|
||||||
next: 14.1.3(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: 18.2.0
|
||||||
react-dom: 18.2.0(react@18.2.0)
|
react-dom: 18.2.0(react@18.2.0)
|
||||||
dev: false
|
dev: false
|
||||||
@@ -6182,14 +6187,14 @@ packages:
|
|||||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||||
hasBin: true
|
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@14.2.3)(react-dom@18.2.0)(react@18.2.0):
|
||||||
resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==}
|
resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
next: '*'
|
next: '*'
|
||||||
react: '*'
|
react: '*'
|
||||||
react-dom: '*'
|
react-dom: '*'
|
||||||
dependencies:
|
dependencies:
|
||||||
next: 14.1.3(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: 18.2.0
|
||||||
react-dom: 18.2.0(react@18.2.0)
|
react-dom: 18.2.0(react@18.2.0)
|
||||||
dev: false
|
dev: false
|
||||||
@@ -6198,23 +6203,26 @@ packages:
|
|||||||
resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==}
|
resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/next@14.1.3(react-dom@18.2.0)(react@18.2.0):
|
/next@14.2.3(react-dom@18.2.0)(react@18.2.0):
|
||||||
resolution: {integrity: sha512-oexgMV2MapI0UIWiXKkixF8J8ORxpy64OuJ/J9oVUmIthXOUCcuVEZX+dtpgq7wIfIqtBwQsKEDXejcjTsan9g==}
|
resolution: {integrity: sha512-dowFkFTR8v79NPJO4QsBUtxv0g9BrS/phluVpMAt2ku7H+cbcBJlopXjkWlwxrk/xGqMemr7JkGPGemPrLLX7A==}
|
||||||
engines: {node: '>=18.17.0'}
|
engines: {node: '>=18.17.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@opentelemetry/api': ^1.1.0
|
'@opentelemetry/api': ^1.1.0
|
||||||
|
'@playwright/test': ^1.41.2
|
||||||
react: ^18.2.0
|
react: ^18.2.0
|
||||||
react-dom: ^18.2.0
|
react-dom: ^18.2.0
|
||||||
sass: ^1.3.0
|
sass: ^1.3.0
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
'@opentelemetry/api':
|
'@opentelemetry/api':
|
||||||
optional: true
|
optional: true
|
||||||
|
'@playwright/test':
|
||||||
|
optional: true
|
||||||
sass:
|
sass:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@next/env': 14.1.3
|
'@next/env': 14.2.3
|
||||||
'@swc/helpers': 0.5.2
|
'@swc/helpers': 0.5.5
|
||||||
busboy: 1.6.0
|
busboy: 1.6.0
|
||||||
caniuse-lite: 1.0.30001598
|
caniuse-lite: 1.0.30001598
|
||||||
graceful-fs: 4.2.11
|
graceful-fs: 4.2.11
|
||||||
@@ -6223,15 +6231,15 @@ packages:
|
|||||||
react-dom: 18.2.0(react@18.2.0)
|
react-dom: 18.2.0(react@18.2.0)
|
||||||
styled-jsx: 5.1.1(react@18.2.0)
|
styled-jsx: 5.1.1(react@18.2.0)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@next/swc-darwin-arm64': 14.1.3
|
'@next/swc-darwin-arm64': 14.2.3
|
||||||
'@next/swc-darwin-x64': 14.1.3
|
'@next/swc-darwin-x64': 14.2.3
|
||||||
'@next/swc-linux-arm64-gnu': 14.1.3
|
'@next/swc-linux-arm64-gnu': 14.2.3
|
||||||
'@next/swc-linux-arm64-musl': 14.1.3
|
'@next/swc-linux-arm64-musl': 14.2.3
|
||||||
'@next/swc-linux-x64-gnu': 14.1.3
|
'@next/swc-linux-x64-gnu': 14.2.3
|
||||||
'@next/swc-linux-x64-musl': 14.1.3
|
'@next/swc-linux-x64-musl': 14.2.3
|
||||||
'@next/swc-win32-arm64-msvc': 14.1.3
|
'@next/swc-win32-arm64-msvc': 14.2.3
|
||||||
'@next/swc-win32-ia32-msvc': 14.1.3
|
'@next/swc-win32-ia32-msvc': 14.2.3
|
||||||
'@next/swc-win32-x64-msvc': 14.1.3
|
'@next/swc-win32-x64-msvc': 14.2.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@babel/core'
|
- '@babel/core'
|
||||||
- babel-plugin-macros
|
- babel-plugin-macros
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export const domainRouter = createTRPCRouter({
|
|||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
const domain = await findDomainById(input.domainId);
|
const domain = await findDomainById(input.domainId);
|
||||||
const result = await removeDomainById(input.domainId);
|
const result = await removeDomainById(input.domainId);
|
||||||
removeDomain(domain.application.appName, domain.uniqueConfigKey);
|
await removeDomain(domain.application.appName, domain.uniqueConfigKey);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -36,9 +36,8 @@ export const createApplication = async (
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
createTraefikConfig(newApplication.appName);
|
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
|
createTraefikConfig(newApplication.appName);
|
||||||
await tx.insert(domains).values({
|
await tx.insert(domains).values({
|
||||||
applicationId: newApplication.applicationId,
|
applicationId: newApplication.applicationId,
|
||||||
host: `${newApplication.appName}.docker.localhost`,
|
host: `${newApplication.appName}.docker.localhost`,
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ void app.prepare().then(async () => {
|
|||||||
await initializeNetwork();
|
await initializeNetwork();
|
||||||
createDefaultTraefikConfig();
|
createDefaultTraefikConfig();
|
||||||
createDefaultServerTraefikConfig();
|
createDefaultServerTraefikConfig();
|
||||||
|
await initializePostgres();
|
||||||
await initializeTraefik();
|
await initializeTraefik();
|
||||||
await initializeRedis();
|
await initializeRedis();
|
||||||
await initializePostgres();
|
|
||||||
initCronJobs();
|
initCronJobs();
|
||||||
welcomeServer();
|
welcomeServer();
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import { buildPaketo } from "./paketo";
|
|||||||
// NIXPACKS codeDirectory = where is the path of the code directory
|
// NIXPACKS codeDirectory = where is the path of the code directory
|
||||||
// HEROKU 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
|
// 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<
|
export type ApplicationNested = InferResultType<
|
||||||
"applications",
|
"applications",
|
||||||
{ mounts: true; security: true; redirects: true; ports: true }
|
{ mounts: true; security: true; redirects: true; ports: true }
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
createServiceConfig,
|
createServiceConfig,
|
||||||
loadOrCreateConfig,
|
loadOrCreateConfig,
|
||||||
|
removeTraefikConfig,
|
||||||
writeTraefikConfig,
|
writeTraefikConfig,
|
||||||
} from "./application";
|
} from "./application";
|
||||||
import type { ApplicationNested } from "../builders";
|
import type { ApplicationNested } from "../builders";
|
||||||
@@ -23,7 +24,7 @@ export const manageDomain = async (app: ApplicationNested, domain: Domain) => {
|
|||||||
writeTraefikConfig(config, appName);
|
writeTraefikConfig(config, appName);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const removeDomain = (appName: string, uniqueKey: number) => {
|
export const removeDomain = async (appName: string, uniqueKey: number) => {
|
||||||
const config: FileConfig = loadOrCreateConfig(appName);
|
const config: FileConfig = loadOrCreateConfig(appName);
|
||||||
|
|
||||||
const routerKey = `${appName}-router-${uniqueKey}`;
|
const routerKey = `${appName}-router-${uniqueKey}`;
|
||||||
@@ -35,7 +36,15 @@ export const removeDomain = (appName: string, uniqueKey: number) => {
|
|||||||
delete config.http.services[serviceKey];
|
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 (
|
export const createRouterConfig = async (
|
||||||
|
|||||||
Reference in New Issue
Block a user