mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 17:27:31 +00:00
preview
This commit is contained in:
11
apps/console/Dockerfile
Normal file
11
apps/console/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
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
|
||||
# TODO Needs work to be configured for the console app
|
||||
COPY --chown=nginx:nginx dist/console /usr/share/nginx/html
|
||||
EXPOSE 3001
|
||||
ENTRYPOINT ["nginx", "-c", "/etc/nginx/nginx.conf"]
|
||||
CMD ["-g", "daemon off;"]
|
69
apps/console/nginx.conf
Normal file
69
apps/console/nginx.conf
Normal 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 3001;
|
||||
server_name localhost;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Angular 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";
|
||||
}
|
||||
}
|
||||
}
|
@@ -11,15 +11,15 @@
|
||||
"lint:check:prettier": "prettier --check src",
|
||||
"lint:fix": "prettier --write src",
|
||||
"generate": "pnpm exec buf generate ../../proto --include-imports --include-wkt",
|
||||
"clean": "rm -rf dist .angular .turbo node_modules src/app/proto/generated"
|
||||
"clean": "rm -rf dist .angular node_modules src/app/proto/generated"
|
||||
},
|
||||
"nx": {
|
||||
"release": {
|
||||
"docker": {
|
||||
"repositoryName": "zitadel/console"
|
||||
}
|
||||
},
|
||||
"targets": {
|
||||
"release": {
|
||||
"docker": {
|
||||
"repositoryName": "zitadel/console"
|
||||
}
|
||||
},
|
||||
"generate": {
|
||||
"outputs": [
|
||||
"{projectRoot}/src/app/proto/generated/**"
|
||||
@@ -33,10 +33,21 @@
|
||||
"generate",
|
||||
"@zitadel/client:build"
|
||||
]
|
||||
},
|
||||
"docker:build": {
|
||||
"dependsOn": ["build"]
|
||||
},
|
||||
"docker:run": {
|
||||
"options": {
|
||||
"args": [
|
||||
"-p",
|
||||
"3001:3001"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"dependencies": {
|
||||
"@angular/animations": "^16.2.12",
|
||||
"@angular/cdk": "^16.2.14",
|
||||
"@angular/common": "^16.2.12",
|
||||
|
Reference in New Issue
Block a user