mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor(dockerfile): update dockerfile
This commit is contained in:
@@ -11,6 +11,7 @@ jobs:
|
||||
command: |
|
||||
cp apps/dokploy/.env.production.example .env.production
|
||||
cp apps/dokploy/.env.production.example apps/dokploy/.env.production
|
||||
|
||||
- run:
|
||||
name: Build and push AMD64 image
|
||||
command: |
|
||||
@@ -21,63 +22,63 @@ jobs:
|
||||
TAG="canary"
|
||||
fi
|
||||
docker build --platform linux/amd64 -t dokploy/dokploy:${TAG}-amd64 .
|
||||
docker push dokploy/dokploy:${TAG}-amd64
|
||||
# docker push dokploy/dokploy:${TAG}-amd64
|
||||
|
||||
build-arm64:
|
||||
machine:
|
||||
image: ubuntu-2004:current
|
||||
resource_class: arm.large
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Prepare .env file
|
||||
command: |
|
||||
cp apps/dokploy/.env.production.example .env.production
|
||||
cp apps/dokploy/.env.production.example apps/dokploy/.env.production
|
||||
- run:
|
||||
name: Build and push ARM64 image
|
||||
command: |
|
||||
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_TOKEN
|
||||
if [ "${CIRCLE_BRANCH}" == "main" ]; then
|
||||
TAG="latest"
|
||||
else
|
||||
TAG="canary"
|
||||
fi
|
||||
docker build --platform linux/arm64 -t dokploy/dokploy:${TAG}-arm64 .
|
||||
docker push dokploy/dokploy:${TAG}-arm64
|
||||
# build-arm64:
|
||||
# machine:
|
||||
# image: ubuntu-2004:current
|
||||
# resource_class: arm.large
|
||||
# steps:
|
||||
# - checkout
|
||||
# - run:
|
||||
# name: Prepare .env file
|
||||
# command: |
|
||||
# cp apps/dokploy/.env.production.example .env.production
|
||||
# cp apps/dokploy/.env.production.example apps/dokploy/.env.production
|
||||
# - run:
|
||||
# name: Build and push ARM64 image
|
||||
# command: |
|
||||
# docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_TOKEN
|
||||
# if [ "${CIRCLE_BRANCH}" == "main" ]; then
|
||||
# TAG="latest"
|
||||
# else
|
||||
# TAG="canary"
|
||||
# fi
|
||||
# docker build --platform linux/arm64 -t dokploy/dokploy:${TAG}-arm64 .
|
||||
# docker push dokploy/dokploy:${TAG}-arm64
|
||||
|
||||
combine-manifests:
|
||||
docker:
|
||||
- image: cimg/node:18.18.0
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
name: Create and push multi-arch manifest
|
||||
command: |
|
||||
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_TOKEN
|
||||
# combine-manifests:
|
||||
# docker:
|
||||
# - image: cimg/node:18.18.0
|
||||
# steps:
|
||||
# - checkout
|
||||
# - setup_remote_docker
|
||||
# - run:
|
||||
# name: Create and push multi-arch manifest
|
||||
# command: |
|
||||
# docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_TOKEN
|
||||
|
||||
if [ "${CIRCLE_BRANCH}" == "main" ]; then
|
||||
VERSION=$(node -p "require('./apps/dokploy/package.json').version")
|
||||
echo $VERSION
|
||||
TAG="latest"
|
||||
|
||||
docker manifest create dokploy/dokploy:${TAG} \
|
||||
dokploy/dokploy:${TAG}-amd64 \
|
||||
dokploy/dokploy:${TAG}-arm64
|
||||
docker manifest push dokploy/dokploy:${TAG}
|
||||
# if [ "${CIRCLE_BRANCH}" == "main" ]; then
|
||||
# VERSION=$(node -p "require('./apps/dokploy/package.json').version")
|
||||
# echo $VERSION
|
||||
# TAG="latest"
|
||||
|
||||
docker manifest create dokploy/dokploy:${VERSION} \
|
||||
dokploy/dokploy:${TAG}-amd64 \
|
||||
dokploy/dokploy:${TAG}-arm64
|
||||
docker manifest push dokploy/dokploy:${VERSION}
|
||||
else
|
||||
TAG="canary"
|
||||
docker manifest create dokploy/dokploy:${TAG} \
|
||||
dokploy/dokploy:${TAG}-amd64 \
|
||||
dokploy/dokploy:${TAG}-arm64
|
||||
docker manifest push dokploy/dokploy:${TAG}
|
||||
fi
|
||||
# docker manifest create dokploy/dokploy:${TAG} \
|
||||
# dokploy/dokploy:${TAG}-amd64 \
|
||||
# dokploy/dokploy:${TAG}-arm64
|
||||
# docker manifest push dokploy/dokploy:${TAG}
|
||||
|
||||
# docker manifest create dokploy/dokploy:${VERSION} \
|
||||
# dokploy/dokploy:${TAG}-amd64 \
|
||||
# dokploy/dokploy:${TAG}-arm64
|
||||
# docker manifest push dokploy/dokploy:${VERSION}
|
||||
# else
|
||||
# TAG="canary"
|
||||
# docker manifest create dokploy/dokploy:${TAG} \
|
||||
# dokploy/dokploy:${TAG}-amd64 \
|
||||
# dokploy/dokploy:${TAG}-arm64
|
||||
# docker manifest push dokploy/dokploy:${TAG}
|
||||
# fi
|
||||
|
||||
workflows:
|
||||
build-all:
|
||||
@@ -86,20 +87,22 @@ workflows:
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- main
|
||||
- canary
|
||||
- build-arm64:
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- main
|
||||
- canary
|
||||
- combine-manifests:
|
||||
requires:
|
||||
- build-amd64
|
||||
- build-arm64
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- main
|
||||
- canary
|
||||
- feat/cloud
|
||||
# - main
|
||||
# - canary
|
||||
# -
|
||||
# - build-arm64:
|
||||
# filters:
|
||||
# branches:
|
||||
# only:
|
||||
# - main
|
||||
# - canary
|
||||
# - combine-manifests:
|
||||
# requires:
|
||||
# - build-amd64
|
||||
# - build-arm64
|
||||
# filters:
|
||||
# branches:
|
||||
# only:
|
||||
# - main
|
||||
# - canary
|
||||
|
||||
@@ -15,7 +15,9 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||
# Deploy only the dokploy app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
RUN pnpm --filter=@dokploy/builders build
|
||||
RUN pnpm --filter=./apps/dokploy run build
|
||||
|
||||
RUN pnpm --filter=./apps/dokploy --prod deploy /prod/dokploy
|
||||
|
||||
RUN cp -R /usr/src/app/apps/dokploy/.next /prod/dokploy/.next
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
import type * as schema from "@/server/db/schema";
|
||||
import type {
|
||||
BuildQueryResult,
|
||||
DBQueryConfig,
|
||||
ExtractTablesWithRelations,
|
||||
} from "drizzle-orm";
|
||||
import { z } from "zod";
|
||||
/*
|
||||
* This is for testing purposes in the case we need a nested relational types
|
||||
*
|
||||
*/
|
||||
|
||||
type Schema = typeof schema;
|
||||
type TSchema = ExtractTablesWithRelations<Schema>;
|
||||
|
||||
export type IncludeRelation<TableName extends keyof TSchema> = DBQueryConfig<
|
||||
"one" | "many",
|
||||
boolean,
|
||||
TSchema,
|
||||
TSchema[TableName]
|
||||
>["with"];
|
||||
|
||||
export type InferResultType<
|
||||
TableName extends keyof TSchema,
|
||||
With extends IncludeRelation<TableName> | undefined = undefined,
|
||||
> = BuildQueryResult<
|
||||
TSchema,
|
||||
TSchema[TableName],
|
||||
{
|
||||
with: With;
|
||||
}
|
||||
>;
|
||||
|
||||
type AnyObj = Record<PropertyKey, unknown>;
|
||||
|
||||
type ZodObj<T extends AnyObj> = {
|
||||
[key in keyof T]: z.ZodType<T[key]>;
|
||||
};
|
||||
const zObject = <T extends AnyObj>(arg: ZodObj<T>) => z.object(arg);
|
||||
|
||||
// const goodDogScheme = zObject<UserWithPosts>({
|
||||
// // prueba: schema.selectDatabaseSchema,
|
||||
// // domain: z.string(),
|
||||
// // domainId: z.string(),
|
||||
// });
|
||||
Reference in New Issue
Block a user