Skip to content

Commit

Permalink
See #3. Initial Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarman committed Jul 4, 2018
1 parent 8e12466 commit 89f6a2c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Start with nginx alpine
FROM nginx:1.14-alpine
# Copy nginx configuration file(s)
COPY etc/nginx/*.conf /etc/nginx/conf.d/
# Remove default nginx configuration file
RUN rm /etc/nginx/conf.d/default.conf
# Copy dist/ to /usr/share/nginx/html/
COPY dist/ /usr/share/nginx/html/
# Application should be accessible on port 80
# Note: This is the default port exposed by the nginx image
13 changes: 13 additions & 0 deletions etc/nginx/spa.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Basic NGINX configuration for a Single-Page Application (SPA)
server {
listen 80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html index.htm;

# This try_files statement facilitates SPA framework routing
try_files $uri $uri/ /index.html;
}
}

0 comments on commit 89f6a2c

Please sign in to comment.