File tree 3 files changed +41
-0
lines changed
3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ build /
2
+ node_modules /
3
+ .env *
4
+ .git /
Original file line number Diff line number Diff line change
1
+ FROM node:erbium-alpine3.11 as build
2
+
3
+ RUN mkdir /code
4
+ WORKDIR /code
5
+ ENV PATH /code/node_modules/.bin:$PATH
6
+ COPY package.json yarn.lock /code/
7
+ RUN yarn install --prod --pure-lockfile
8
+
9
+ # build the site
10
+ FROM build as app
11
+ COPY . /code
12
+ RUN yarn run build
13
+
14
+ # production environment
15
+ FROM nginx:1.16.0-alpine
16
+ COPY --from=app /code/build /usr/share/nginx/html
17
+ RUN rm /etc/nginx/conf.d/default.conf
18
+ COPY infra/nginx.conf /etc/nginx/conf.d
19
+ EXPOSE 8000
20
+ CMD ["nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change
1
+ server {
2
+
3
+ listen 8000 ;
4
+
5
+ location / {
6
+ root /usr/share/nginx/html;
7
+ index index.html index.htm;
8
+ try_files $uri $uri / /index.html;
9
+ }
10
+
11
+ error_page 500 502 503 504 /50x.html;
12
+
13
+ location = /50x.html {
14
+ root /usr/share/nginx/html;
15
+ }
16
+
17
+ }
You can’t perform that action at this time.
0 commit comments