File tree Expand file tree Collapse file tree 3 files changed +48
-3
lines changed
Expand file tree Collapse file tree 3 files changed +48
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ dzdo docker run -d --rm \
1111 --env-file .env \
1212 -p 80:80 -p 443:433 \
1313 --name resdeeds-web \
14- -v ./etc/ssl:/etc/ssl
14+ -v ./etc/ssl:/etc/ssl \
15+ -v ./etc/nginx:/etc/nginx/conf.d \
16+ -v /var/log/nginx:/var/log/nginx \
1517 ghcr.io/idaholab/resdeeds/web:latest
1618
1719echo " Deployed"
Original file line number Diff line number Diff line change @@ -21,8 +21,6 @@ RUN ng build --configuration=production
2121
2222FROM nginx:alpine
2323
24- COPY etc/nginx.conf /etc/nginx/conf.d/default.conf
25-
2624COPY --from=build /var/www/dist/resdeeds /usr/share/nginx/html
2725
2826EXPOSE 80 443 4200
Original file line number Diff line number Diff line change 1+ server {
2+ listen 443 ssl;
3+ server_name localhost;
4+
5+ # Path to SSL certificate and key
6+ ssl_certificate /etc/ssl/certs/localhost.cer;
7+ ssl_certificate_key /etc/ssl/private/localhost.key;
8+
9+ # Root directory for the Angular app
10+ root /usr/share/nginx/html;
11+
12+ # Default file to serve
13+ index index.html;
14+
15+ # Redirect HTTP traffic to HTTPS
16+ error_page 404 /index.html;
17+
18+ # Handle Angular's HTML5 pushState
19+ location / {
20+ try_files $uri $uri/ /index.html;
21+ }
22+
23+ # Optional: Gzip compression for improved performance
24+ gzip on;
25+ gzip_types text/plain application/javascript text/css application/json application/xml text/javascript;
26+ gzip_min_length 1024;
27+ }
28+
29+
30+ server {
31+ listen 80;
32+ server_name localhost;
33+
34+ # Serve static files from /usr/share/nginx/html
35+ location / {
36+ root /usr/share/nginx/html;
37+ index index.html index.htm;
38+ }
39+
40+ # Error pages
41+ error_page 500 502 503 504 /50x.html;
42+ location = /50x.html {
43+ root /usr/share/nginx/html;
44+ }
45+ }
You can’t perform that action at this time.
0 commit comments