File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ # Start with nginx alpine
2+ FROM nginx:1.14-alpine
3+ # Copy nginx configuration file(s)
4+ COPY etc/nginx/*.conf /etc/nginx/conf.d/
5+ # Remove default nginx configuration file
6+ RUN rm /etc/nginx/conf.d/default.conf
7+ # Copy dist/ to /usr/share/nginx/html/
8+ COPY dist/ /usr/share/nginx/html/
9+ # Application should be accessible on port 80
10+ # Note: This is the default port exposed by the nginx image
Original file line number Diff line number Diff line change 1+ # Basic NGINX configuration for a Single-Page Application (SPA)
2+ server {
3+ listen 80;
4+ server_name localhost;
5+
6+ location / {
7+ root /usr/share/nginx/html;
8+ index index.html index.htm;
9+
10+ # This try_files statement facilitates SPA framework routing
11+ try_files $uri $uri/ /index.html;
12+ }
13+ }
You can’t perform that action at this time.
0 commit comments