Skip to content

Commit fc30b3c

Browse files
authored
Merge pull request #507 from divyav-aot/rsbc/7.0.0
Change Date and Time format
2 parents 8f7581f + 07fe76a commit fc30b3c

File tree

3 files changed

+72
-89
lines changed

3 files changed

+72
-89
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@ COPY --from=builder /app/versioned/ /usr/share/nginx/html/
7373
HEALTHCHECK --interval=30s --timeout=3s CMD wget -q --spider http://localhost/ || exit 1
7474

7575
# Expose Nginx port
76-
EXPOSE 80
76+
EXPOSE 8080
7777
CMD ["nginx", "-g", "daemon off;"]

forms-flow-service/src/constants/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export const DATE_FORMAT =
2-
(window as any)._env_ && (window as any)._env_.REACT_APP_DATE_FORMAT || "DD-MM-YYYY";
2+
(window as any)._env_ && (window as any)._env_.REACT_APP_DATE_FORMAT || "YYYY-MM-DD";
33

44
export const TIME_FORMAT =
5-
(window as any)._env_ && (window as any)._env_.REACT_APP_TIME_FORMAT || "hh:mm:ss A";
5+
(window as any)._env_ && (window as any)._env_.REACT_APP_TIME_FORMAT || "HH:mm:ss";
66

77
const MULTITENANCY_ENABLED_VARIABLE = (window as any)._env_?.REACT_APP_MULTI_TENANCY_ENABLED || false;
88

nginx.conf

Lines changed: 69 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,79 @@
1-
user nginx;
21
worker_processes auto;
3-
error_log /var/log/nginx/error.log warn;
4-
pid /var/run/nginx.pid;
2+
error_log /var/log/nginx/error.log;
3+
4+
pid /tmp/nginx.pid;
55

66
events {
7-
worker_connections 1024;
7+
worker_connections 4096;
88
}
99

1010
http {
11-
include /etc/nginx/mime.types;
12-
default_type application/octet-stream;
11+
include /etc/nginx/mime.types;
12+
client_body_temp_path /tmp/client_temp;
13+
proxy_temp_path /tmp/proxy_temp_path;
14+
fastcgi_temp_path /tmp/fastcgi_temp;
15+
uwsgi_temp_path /tmp/uwsgi_temp;
16+
scgi_temp_path /tmp/scgi_temp;
17+
default_type application/octet-stream;
18+
server_tokens off;
19+
underscores_in_headers on;
20+
21+
# Use a w3c standard log format
22+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
23+
'$status $body_bytes_sent "$http_referer" '
24+
'"$http_user_agent" "$http_x_forwarded_for"';
25+
26+
access_log /var/log/nginx/access.log main;
27+
28+
# Enable gzip compression for better performance
29+
gzip on;
30+
gzip_disable "msie6";
31+
gzip_vary on;
32+
gzip_proxied any;
33+
gzip_comp_level 6;
34+
gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
35+
36+
server {
37+
# add in most common security headers
38+
add_header Content-Security-Policy "default-src * data: blob: filesystem: 'unsafe-inline' 'unsafe-eval'";
39+
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
40+
add_header X-Content-Type-Options "nosniff";
41+
add_header X-XSS-Protection 1;
42+
add_header X-Frame-Options SAMEORIGIN;
43+
44+
listen 8080;
45+
server_name _;
46+
47+
index index.html;
48+
error_log /dev/stdout info;
49+
access_log /dev/stdout;
50+
51+
# Serve versioned static files
52+
location ~ ^/forms-flow-.*@.*/.*$ {
53+
root /usr/share/nginx/html;
54+
try_files $uri =404;
55+
# Add cache headers for better performance
56+
expires 1d;
57+
add_header Cache-Control "public";
58+
}
59+
60+
# Main application entry
61+
location / {
62+
root /usr/share/nginx/html;
63+
index index.html index.htm;
64+
try_files $uri $uri/ /index.html;
65+
}
1366

14-
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
15-
'$status $body_bytes_sent "$http_referer" '
16-
'"$http_user_agent" "$http_x_forwarded_for"';
67+
# Version information endpoint
68+
location = /version {
69+
alias /usr/share/nginx/html/VERSION;
70+
default_type text/plain;
71+
}
1772

18-
access_log /var/log/nginx/access.log main;
73+
error_page 500 502 503 504 /50x.html;
1974

20-
sendfile on;
21-
tcp_nopush on;
22-
tcp_nodelay on;
23-
keepalive_timeout 65;
24-
types_hash_max_size 2048;
25-
client_max_body_size 20M;
26-
27-
# Enable gzip compression
28-
gzip on;
29-
gzip_vary on;
30-
gzip_proxied any;
31-
gzip_comp_level 6;
32-
gzip_types text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml;
33-
34-
# Microfrontends setup
35-
server {
36-
listen 80;
37-
server_name localhost;
38-
39-
# Root directory for the application
40-
root /usr/share/nginx/html;
41-
42-
# Serve static files
43-
location / {
44-
try_files $uri $uri/ /index.html;
45-
}
46-
47-
# Define locations for each microfrontend
48-
location /forms-flow-admin/ {
49-
alias /usr/share/nginx/html/forms-flow-admin/;
50-
try_files $uri $uri/ /forms-flow-admin/index.html;
51-
}
52-
53-
location /forms-flow-components/ {
54-
alias /usr/share/nginx/html/forms-flow-components/;
55-
try_files $uri $uri/ /forms-flow-components/index.html;
56-
}
57-
58-
location /forms-flow-integration/ {
59-
alias /usr/share/nginx/html/forms-flow-integration/;
60-
try_files $uri $uri/ /forms-flow-integration/index.html;
61-
}
62-
63-
location /forms-flow-nav/ {
64-
alias /usr/share/nginx/html/forms-flow-nav/;
65-
try_files $uri $uri/ /forms-flow-nav/index.html;
66-
}
67-
68-
location /forms-flow-rsbcservice/ {
69-
alias /usr/share/nginx/html/forms-flow-rsbcservice/;
70-
try_files $uri $uri/ /forms-flow-rsbcservice/index.html;
71-
}
72-
73-
location /forms-flow-service/ {
74-
alias /usr/share/nginx/html/forms-flow-service/;
75-
try_files $uri $uri/ /forms-flow-service/index.html;
76-
}
77-
78-
location /forms-flow-theme/ {
79-
alias /usr/share/nginx/html/forms-flow-theme/;
80-
try_files $uri $uri/ /forms-flow-theme/index.html;
81-
}
82-
83-
# Add cache control for static assets
84-
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
85-
expires 30d;
86-
add_header Cache-Control "public, no-transform";
87-
}
88-
89-
# Health check endpoint
90-
location /health {
91-
access_log off;
92-
return 200 'OK';
93-
add_header Content-Type text/plain;
94-
}
95-
}
75+
location = /50x.html {
76+
root /usr/share/nginx/html;
77+
}
78+
}
9679
}

0 commit comments

Comments
 (0)