Skip to content

Commit 89f6a2c

Browse files
committed
See #3. Initial Dockerfile.
1 parent 8e12466 commit 89f6a2c

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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

etc/nginx/spa.conf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
}

0 commit comments

Comments
 (0)