WIP prepare skeleton for Nx migration

This commit is contained in:
Florian Forster
2025-08-06 09:39:57 -07:00
parent b6ebabb962
commit 8c7d8dcea8
54 changed files with 3611 additions and 2776 deletions

9
docs/Dockerfile Normal file
View File

@@ -0,0 +1,9 @@
FROM nginx:1.29.0
RUN touch /var/run/nginx.pid && \
chown -R nginx:nginx /var/cache/nginx /var/run/nginx.pid
USER nginx
COPY --chown=nginx:nginx nginx.conf /etc/nginx/nginx.conf
COPY --chown=nginx:nginx build /usr/share/nginx/html/docs
EXPOSE 3003
ENTRYPOINT ["nginx", "-c", "/etc/nginx/nginx.conf"]
CMD ["-g", "daemon off;"]

69
docs/nginx.conf Normal file
View File

@@ -0,0 +1,69 @@
worker_processes auto;
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Logging
access_log off;
error_log /dev/stderr warn;
# Performance
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
keepalive_requests 1000;
# Compression
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_min_length 256;
gzip_comp_level 6;
gzip_types
text/plain
text/css
text/xml
text/javascript
application/javascript
application/x-javascript
application/json
application/xml
application/xml+rss
font/ttf
font/otf
image/svg+xml;
server {
listen 3003;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Docusarus Routing
location / {
try_files $uri $uri/ /index.html;
}
# Static Assets Caching
location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg|map)$ {
expires 1y;
access_log off;
add_header Cache-Control "public, immutable";
}
# Optional: Explicit asset route
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}
}

32
docs/project.json Normal file
View File

@@ -0,0 +1,32 @@
{
"name": "@zitadel/docs",
"$schema": "../node_modules/nx/schemas/project-schema.json",
"targets": {
"generate": {
"outputs": ["{projectRoot}/apis/resources/**"]
},
"start": {
"dependsOn": ["generate"]
},
"build": {
"outputs": ["{projectRoot}/build/**"],
"dependsOn": ["generate"]
},
"dev": {
"dependsOn": ["build"]
},
"docker:build": {
"dependsOn": [
"build"
]
},
"docker:run": {
"options": {
"args": [
"-p",
"3003:3003"
]
}
}
}
}

View File

@@ -1,45 +0,0 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"tasks": {
"generate": {
"dependsOn": ["^generate"],
"outputs": ["docs/api/**", "docs/self-hosting/manage/configure/*.yaml"],
"cache": true
},
"generate:grpc": {
"dependsOn": ["^generate"],
"outputs": ["docs/api/**"],
"cache": true
},
"generate:apidocs": {
"dependsOn": ["generate:grpc"],
"outputs": ["docs/api/**"],
"cache": true
},
"generate:configdocs": {
"outputs": ["docs/self-hosting/manage/configure/*.yaml"],
"cache": true
},
"build": {
"dependsOn": ["generate"],
"outputs": ["build/**"],
"cache": true
},
"dev": {
"dependsOn": ["generate"],
"cache": false,
"persistent": true
},
"start": {
"dependsOn": ["generate"],
"cache": false,
"persistent": true
},
"start:api": {
"dependsOn": ["generate"],
"cache": false,
"persistent": true
}
}
}