mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:27:32 +00:00
remove login pnpm workspace
This commit is contained in:
16
apps/login/.gitignore
vendored
16
apps/login/.gitignore
vendored
@@ -1,2 +1,16 @@
|
|||||||
|
custom-config.js
|
||||||
|
.env*.local
|
||||||
|
standalone
|
||||||
|
tsconfig.tsbuildinfo
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
.idea
|
.turbo
|
||||||
|
*.log
|
||||||
|
.next
|
||||||
|
dist
|
||||||
|
dist-ssr
|
||||||
|
*.local
|
||||||
|
.env
|
||||||
|
.vscode
|
||||||
|
/blob-report/
|
||||||
|
16
apps/login/apps/login/.gitignore
vendored
16
apps/login/apps/login/.gitignore
vendored
@@ -1,16 +0,0 @@
|
|||||||
custom-config.js
|
|
||||||
.env*.local
|
|
||||||
standalone
|
|
||||||
tsconfig.tsbuildinfo
|
|
||||||
|
|
||||||
.DS_Store
|
|
||||||
node_modules
|
|
||||||
.turbo
|
|
||||||
*.log
|
|
||||||
.next
|
|
||||||
dist
|
|
||||||
dist-ssr
|
|
||||||
*.local
|
|
||||||
.env
|
|
||||||
.vscode
|
|
||||||
/blob-report/
|
|
@@ -1,83 +0,0 @@
|
|||||||
{
|
|
||||||
"packageManager": "pnpm@9.1.2+sha256.19c17528f9ca20bd442e4ca42f00f1b9808a9cb419383cd04ba32ef19322aba7",
|
|
||||||
"name": "@zitadel/login",
|
|
||||||
"private": true,
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
|
||||||
"dev": "next dev",
|
|
||||||
"build": "next build",
|
|
||||||
"build:login:standalone": "NEXT_PUBLIC_BASE_PATH=/ui/v2/login NEXT_OUTPUT_MODE=standalone next build",
|
|
||||||
"start": "next start",
|
|
||||||
"lint": "pnpm run '/^lint:check:.*$/'",
|
|
||||||
"lint:check:next": "next lint",
|
|
||||||
"lint:check:prettier": "prettier --check .",
|
|
||||||
"lint:fix": "prettier --write .",
|
|
||||||
"test:unit": "vitest --run",
|
|
||||||
"lint-staged": "lint-staged",
|
|
||||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
|
||||||
},
|
|
||||||
"git": {
|
|
||||||
"pre-commit": "lint-staged"
|
|
||||||
},
|
|
||||||
"lint-staged": {
|
|
||||||
"*": "prettier --write --ignore-unknown"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@headlessui/react": "^2.1.9",
|
|
||||||
"@heroicons/react": "2.1.3",
|
|
||||||
"@radix-ui/react-tooltip": "^1.2.7",
|
|
||||||
"@tailwindcss/forms": "0.5.7",
|
|
||||||
"@vercel/analytics": "^1.2.2",
|
|
||||||
"@zitadel/client": "latest",
|
|
||||||
"@zitadel/proto": "latest",
|
|
||||||
"clsx": "1.2.1",
|
|
||||||
"copy-to-clipboard": "^3.3.3",
|
|
||||||
"deepmerge": "^4.3.1",
|
|
||||||
"lucide-react": "0.469.0",
|
|
||||||
"moment": "^2.29.4",
|
|
||||||
"next": "15.4.0-canary.86",
|
|
||||||
"next-intl": "^3.25.1",
|
|
||||||
"next-themes": "^0.2.1",
|
|
||||||
"nice-grpc": "2.0.1",
|
|
||||||
"qrcode.react": "^3.1.0",
|
|
||||||
"react": "19.1.0",
|
|
||||||
"react-dom": "19.1.0",
|
|
||||||
"react-hook-form": "7.39.5",
|
|
||||||
"tinycolor2": "1.4.2",
|
|
||||||
"uuid": "^11.1.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/eslint-parser": "^7.23.0",
|
|
||||||
"@bufbuild/buf": "^1.53.0",
|
|
||||||
"@testing-library/jest-dom": "^6.6.3",
|
|
||||||
"@testing-library/react": "^16.3.0",
|
|
||||||
"@types/ms": "2.1.0",
|
|
||||||
"@types/node": "^22.14.1",
|
|
||||||
"@types/react": "19.1.2",
|
|
||||||
"@types/react-dom": "19.1.2",
|
|
||||||
"@types/tinycolor2": "1.4.3",
|
|
||||||
"@types/uuid": "^10.0.0",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
||||||
"@typescript-eslint/parser": "^7.0.0",
|
|
||||||
"@vercel/git-hooks": "1.0.0",
|
|
||||||
"@vitejs/plugin-react": "^4.4.1",
|
|
||||||
"autoprefixer": "10.4.21",
|
|
||||||
"eslint": "^8.57.0",
|
|
||||||
"eslint-config-next": "15.4.0-canary.86",
|
|
||||||
"eslint-config-prettier": "^9.1.0",
|
|
||||||
"grpc-tools": "1.13.0",
|
|
||||||
"jsdom": "^26.1.0",
|
|
||||||
"lint-staged": "15.5.1",
|
|
||||||
"make-dir-cli": "4.0.0",
|
|
||||||
"postcss": "8.5.3",
|
|
||||||
"prettier": "^3.2.5",
|
|
||||||
"prettier-plugin-organize-imports": "^3.2.0",
|
|
||||||
"prettier-plugin-tailwindcss": "0.6.11",
|
|
||||||
"sass": "^1.87.0",
|
|
||||||
"tailwindcss": "3.4.14",
|
|
||||||
"ts-proto": "^2.7.0",
|
|
||||||
"typescript": "^5.8.3",
|
|
||||||
"vite-tsconfig-paths": "^5.1.4",
|
|
||||||
"vitest": "^2.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,3 +0,0 @@
|
|||||||
target "release" {
|
|
||||||
platforms = ["linux/amd64", "linux/arm64"]
|
|
||||||
}
|
|
@@ -1,159 +0,0 @@
|
|||||||
variable "LOGIN_DIR" {
|
|
||||||
default = "./"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "DOCKERFILES_DIR" {
|
|
||||||
default = "dockerfiles/"
|
|
||||||
}
|
|
||||||
|
|
||||||
# The release target is overwritten in docker-bake-release.hcl
|
|
||||||
# It makes sure the image is built for multiple platforms.
|
|
||||||
# By default the platforms property is empty, so images are only built for the current bake runtime platform.
|
|
||||||
target "release" {}
|
|
||||||
|
|
||||||
# typescript-proto-client is used to generate the client code for the login service.
|
|
||||||
# It is not login-prefixed, so it is easily extendable.
|
|
||||||
# To extend this bake-file.hcl, set the context of all login-prefixed targets to a different directory.
|
|
||||||
# For example docker bake --file login/docker-bake.hcl --file docker-bake.hcl --set login-*.context=./login/
|
|
||||||
# The zitadel repository uses this to generate the client and the mock server from local proto files.
|
|
||||||
target "typescript-proto-client" {
|
|
||||||
inherits = ["release"]
|
|
||||||
dockerfile = "${DOCKERFILES_DIR}typescript-proto-client.Dockerfile"
|
|
||||||
contexts = {
|
|
||||||
# We directly generate and download the client server-side with buf, so we don't need the proto files
|
|
||||||
login-pnpm = "target:login-pnpm"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# We prefix the target with login- so we can reuse the writing of protos if we overwrite the typescript-proto-client target.
|
|
||||||
target "login-typescript-proto-client-out" {
|
|
||||||
dockerfile = "${DOCKERFILES_DIR}login-typescript-proto-client-out.Dockerfile"
|
|
||||||
contexts = {
|
|
||||||
typescript-proto-client = "target:typescript-proto-client"
|
|
||||||
}
|
|
||||||
output = [
|
|
||||||
"type=local,dest=${LOGIN_DIR}packages/zitadel-proto"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
# proto-files is only used to build core-mock against which the integration tests run.
|
|
||||||
# To build the proto-client, we use buf to generate and download the client code directly.
|
|
||||||
# It is not login-prefixed, so it is easily extendable.
|
|
||||||
# To extend this bake-file.hcl, set the context of all login-prefixed targets to a different directory.
|
|
||||||
# For example docker bake --file login/docker-bake.hcl --file docker-bake.hcl --set login-*.context=./login/
|
|
||||||
# The zitadel repository uses this to generate the client and the mock server from local proto files.
|
|
||||||
target "proto-files" {
|
|
||||||
inherits = ["release"]
|
|
||||||
dockerfile = "${DOCKERFILES_DIR}proto-files.Dockerfile"
|
|
||||||
contexts = {
|
|
||||||
login-pnpm = "target:login-pnpm"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "NODE_VERSION" {
|
|
||||||
default = "20"
|
|
||||||
}
|
|
||||||
|
|
||||||
target "login-pnpm" {
|
|
||||||
inherits = ["release"]
|
|
||||||
dockerfile = "${DOCKERFILES_DIR}login-pnpm.Dockerfile"
|
|
||||||
args = {
|
|
||||||
NODE_VERSION = "${NODE_VERSION}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
target "login-dev-base" {
|
|
||||||
dockerfile = "${DOCKERFILES_DIR}login-dev-base.Dockerfile"
|
|
||||||
contexts = {
|
|
||||||
login-pnpm = "target:login-pnpm"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
target "login-lint" {
|
|
||||||
dockerfile = "${DOCKERFILES_DIR}login-lint.Dockerfile"
|
|
||||||
contexts = {
|
|
||||||
login-dev-base = "target:login-dev-base"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
target "login-test-unit" {
|
|
||||||
dockerfile = "${DOCKERFILES_DIR}login-test-unit.Dockerfile"
|
|
||||||
contexts = {
|
|
||||||
login-client = "target:login-client"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
target "login-client" {
|
|
||||||
inherits = ["release"]
|
|
||||||
dockerfile = "${DOCKERFILES_DIR}login-client.Dockerfile"
|
|
||||||
contexts = {
|
|
||||||
login-pnpm = "target:login-pnpm"
|
|
||||||
typescript-proto-client = "target:typescript-proto-client"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "LOGIN_CORE_MOCK_TAG" {
|
|
||||||
default = "login-core-mock:local"
|
|
||||||
}
|
|
||||||
|
|
||||||
# the core-mock context must not be overwritten, so we don't prefix it with login-.
|
|
||||||
target "core-mock" {
|
|
||||||
context = "${LOGIN_DIR}apps/login-test-integration/core-mock"
|
|
||||||
contexts = {
|
|
||||||
protos = "target:proto-files"
|
|
||||||
}
|
|
||||||
tags = ["${LOGIN_CORE_MOCK_TAG}"]
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "LOGIN_TEST_INTEGRATION_TAG" {
|
|
||||||
default = "login-test-integration:local"
|
|
||||||
}
|
|
||||||
|
|
||||||
target "login-test-integration" {
|
|
||||||
dockerfile = "${DOCKERFILES_DIR}login-test-integration.Dockerfile"
|
|
||||||
contexts = {
|
|
||||||
login-pnpm = "target:login-pnpm"
|
|
||||||
}
|
|
||||||
tags = ["${LOGIN_TEST_INTEGRATION_TAG}"]
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "LOGIN_TEST_ACCEPTANCE_TAG" {
|
|
||||||
default = "login-test-acceptance:local"
|
|
||||||
}
|
|
||||||
|
|
||||||
target "login-test-acceptance" {
|
|
||||||
dockerfile = "${DOCKERFILES_DIR}login-test-acceptance.Dockerfile"
|
|
||||||
contexts = {
|
|
||||||
login-pnpm = "target:login-pnpm"
|
|
||||||
}
|
|
||||||
tags = ["${LOGIN_TEST_ACCEPTANCE_TAG}"]
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "LOGIN_TAG" {
|
|
||||||
default = "zitadel-login:local"
|
|
||||||
}
|
|
||||||
|
|
||||||
target "docker-metadata-action" {
|
|
||||||
# In the pipeline, this target is overwritten by the docker metadata action.
|
|
||||||
tags = ["${LOGIN_TAG}"]
|
|
||||||
}
|
|
||||||
|
|
||||||
# We run integration and acceptance tests against the next standalone server for docker.
|
|
||||||
target "login-standalone" {
|
|
||||||
inherits = [
|
|
||||||
"docker-metadata-action",
|
|
||||||
"release",
|
|
||||||
]
|
|
||||||
dockerfile = "${DOCKERFILES_DIR}login-standalone.Dockerfile"
|
|
||||||
contexts = {
|
|
||||||
login-client = "target:login-client"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
target "login-standalone-out" {
|
|
||||||
inherits = ["login-standalone"]
|
|
||||||
target = "login-standalone-out"
|
|
||||||
output = [
|
|
||||||
"type=local,dest=${LOGIN_DIR}apps/login/standalone"
|
|
||||||
]
|
|
||||||
}
|
|
@@ -1,6 +0,0 @@
|
|||||||
FROM typescript-proto-client AS login-client
|
|
||||||
COPY packages/zitadel-client/package.json ./packages/zitadel-client/
|
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
|
||||||
pnpm install --frozen-lockfile --workspace-root --filter ./packages/zitadel-client
|
|
||||||
COPY packages/zitadel-client ./packages/zitadel-client
|
|
||||||
RUN cd packages/zitadel-client && pnpm build
|
|
@@ -1,11 +0,0 @@
|
|||||||
*
|
|
||||||
|
|
||||||
!packages/zitadel-client
|
|
||||||
packages/zitadel-client/dist
|
|
||||||
|
|
||||||
!packages/zitadel-tsconfig
|
|
||||||
|
|
||||||
**/*.md
|
|
||||||
**/*.png
|
|
||||||
**/node_modules
|
|
||||||
**/.turbo
|
|
@@ -1,3 +0,0 @@
|
|||||||
FROM login-pnpm AS login-dev-base
|
|
||||||
RUN pnpm install --frozen-lockfile --prefer-offline --workspace-root --filter .
|
|
||||||
|
|
@@ -1 +0,0 @@
|
|||||||
*
|
|
@@ -1,7 +0,0 @@
|
|||||||
FROM login-dev-base AS login-lint
|
|
||||||
COPY .prettierrc .prettierignore ./
|
|
||||||
COPY apps/login/package.json apps/login/
|
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
|
||||||
pnpm install --frozen-lockfile --workspace-root --filter apps/login
|
|
||||||
COPY . .
|
|
||||||
RUN pnpm lint && pnpm format
|
|
@@ -1,25 +0,0 @@
|
|||||||
*
|
|
||||||
|
|
||||||
!apps/login
|
|
||||||
apps/login/.next
|
|
||||||
apps/login/dist
|
|
||||||
apps/login/screenshots
|
|
||||||
apps/login/standalone
|
|
||||||
apps/login/.env*.local
|
|
||||||
|
|
||||||
!apps/login-test-integration
|
|
||||||
|
|
||||||
!apps/login-test-acceptance
|
|
||||||
apps/login-test-acceptance/test-results
|
|
||||||
|
|
||||||
!/packages/zitadel-tsconfig/*
|
|
||||||
!/packages/zitadel-prettier-config
|
|
||||||
!/packages/zitadel-eslint-config
|
|
||||||
|
|
||||||
!/.prettierrc
|
|
||||||
!/.prettierignore
|
|
||||||
|
|
||||||
**/*.md
|
|
||||||
**/*.png
|
|
||||||
**/node_modules
|
|
||||||
**/.turbo
|
|
@@ -1,10 +0,0 @@
|
|||||||
ARG NODE_VERSION=20
|
|
||||||
FROM node:${NODE_VERSION}-bookworm AS login-pnpm
|
|
||||||
ENV PNPM_HOME="/pnpm"
|
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
|
||||||
RUN corepack enable && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@9.1.2 --activate && \
|
|
||||||
apt-get update && apt-get install -y --no-install-recommends && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
WORKDIR /build
|
|
||||||
COPY turbo.json .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
||||||
ENTRYPOINT ["pnpm"]
|
|
@@ -1,6 +0,0 @@
|
|||||||
*
|
|
||||||
!/turbo.json
|
|
||||||
!/.npmrc
|
|
||||||
!/package.json
|
|
||||||
!/pnpm-lock.yaml
|
|
||||||
!/pnpm-workspace.yaml
|
|
@@ -1,33 +0,0 @@
|
|||||||
FROM login-client AS login-standalone-builder
|
|
||||||
COPY apps/login ./apps/login
|
|
||||||
RUN pnpm exec turbo prune @zitadel/login --docker
|
|
||||||
WORKDIR /build/docker
|
|
||||||
RUN cp -r ../out/json/* .
|
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
|
||||||
pnpm install --frozen-lockfile
|
|
||||||
RUN cp -r ../out/full/* .
|
|
||||||
RUN pnpm exec turbo run build:login:standalone
|
|
||||||
|
|
||||||
FROM scratch AS login-standalone-out
|
|
||||||
COPY --from=login-standalone-builder /build/docker/apps/login/.next/standalone /
|
|
||||||
COPY --from=login-standalone-builder /build/docker/apps/login/.next/static /apps/login/.next/static
|
|
||||||
COPY --from=login-standalone-builder /build/docker/apps/login/public /apps/login/public
|
|
||||||
|
|
||||||
FROM node:20-alpine AS login-standalone
|
|
||||||
WORKDIR /runtime
|
|
||||||
RUN addgroup --system --gid 1001 nodejs && \
|
|
||||||
adduser --system --uid 1001 nextjs
|
|
||||||
# If /.env-file/.env is mounted into the container, its variables are made available to the server before it starts up.
|
|
||||||
RUN mkdir -p /.env-file && touch /.env-file/.env && chown -R nextjs:nodejs /.env-file
|
|
||||||
COPY ./scripts/entrypoint.sh ./
|
|
||||||
COPY ./scripts/healthcheck.js ./
|
|
||||||
COPY --chown=nextjs:nodejs --from=login-standalone-builder /build/docker/apps/login/.next/standalone ./
|
|
||||||
COPY --chown=nextjs:nodejs --from=login-standalone-builder /build/docker/apps/login/.next/static ./apps/login/.next/static
|
|
||||||
COPY --chown=nextjs:nodejs --from=login-standalone-builder /build/docker/apps/login/public ./apps/login/public
|
|
||||||
USER nextjs
|
|
||||||
ENV HOSTNAME="0.0.0.0"
|
|
||||||
ENV PORT=3000
|
|
||||||
# TODO: Check healthy, not ready
|
|
||||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
||||||
CMD ["/bin/sh", "-c", "node ./healthcheck.js http://localhost:${PORT}/ui/v2/login/healthy"]
|
|
||||||
ENTRYPOINT ["./entrypoint.sh"]
|
|
@@ -1,17 +0,0 @@
|
|||||||
*
|
|
||||||
|
|
||||||
!apps/login
|
|
||||||
apps/login/.next
|
|
||||||
apps/login/dist
|
|
||||||
apps/login/screenshots
|
|
||||||
apps/login/standalone
|
|
||||||
apps/login/.env*.local
|
|
||||||
|
|
||||||
!scripts/entrypoint.sh
|
|
||||||
!scripts/healthcheck.js
|
|
||||||
!packages/zitadel-tailwind-config
|
|
||||||
|
|
||||||
**/*.md
|
|
||||||
**/*.png
|
|
||||||
**/node_modules
|
|
||||||
**/.turbo
|
|
@@ -1,8 +0,0 @@
|
|||||||
FROM login-pnpm AS login-test-acceptance-dependencies
|
|
||||||
COPY ./apps/login-test-acceptance/package.json ./apps/login-test-acceptance/package.json
|
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
|
||||||
pnpm install --frozen-lockfile --filter=login-test-acceptance && \
|
|
||||||
cd apps/login-test-acceptance && \
|
|
||||||
pnpm exec playwright install --with-deps chromium
|
|
||||||
COPY ./apps/login-test-acceptance ./apps/login-test-acceptance
|
|
||||||
CMD ["bash", "-c", "cd apps/login-test-acceptance && pnpm test:acceptance test"]
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user