Skip to content
Permalink
Browse files

beanstalk

  • Loading branch information...
rinckd committed Feb 10, 2019
1 parent 878c9ae commit f10c048c9c0bfcf9bd792bddc312518c4ad387f4
Showing with 32 additions and 2 deletions.
  1. +2 −2 angular.json
  2. +16 −0 elastic-beanstalk/Dockerfile
  3. +6 −0 elastic-beanstalk/Dockerrun.aws.json
  4. +8 −0 elastic-beanstalk/custom-nginx-file.conf
@@ -11,7 +11,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"outputPath": "elastic-beanstalk/dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
@@ -125,4 +125,4 @@
"prefix": "my"
}
}
}
}
@@ -0,0 +1,16 @@
FROM nginx:latest

RUN rm -rf /usr/share/nginx/html/*
## Copy angular output to nginx
COPY ./dist /usr/share/nginx/html

## Set the permission for NGINX web folder
RUN chmod 777 -R /usr/share/nginx/html

## Overwrite the default NGINX config
## using the custom config file
COPY ./custom-nginx-file.conf /etc/nginx/conf.d/default.conf

EXPOSE 8080

CMD ["nginx", "-g", "daemon off;"]
@@ -0,0 +1,6 @@
{
"AWSEBDockerrunVersion": "1",
"Ports": [{
"ContainerPort": "8080"
}]
}
@@ -0,0 +1,8 @@
server {
listen 8080;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
}

0 comments on commit f10c048

Please sign in to comment.
You can’t perform that action at this time.