Last active
February 5, 2018 23:04
-
-
Save fiveisprime/63cd7bd93b60e2afc96a1f691e4fb4f3 to your computer and use it in GitHub Desktop.
Angular custom image deployment to Azure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
root /usr/share/nginx/html; | |
charset utf-8; | |
location / { | |
try_files $uri /index.html; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx:stable-alpine | |
ADD dist /usr/share/nginx/html | |
ADD default.conf /etc/nginx/conf.d/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Creates a small image using nginx to serve a single page Angular app. Packages up the
dist
directory and will serve static assets if found and default toindex.html
(line 8 ofdefault.conf
)Usage
default.conf
andDockerfile
to the root of your project$ ng build --prod
prior to building