Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
order-management-react
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ascend
order-management-react
Commits
8b4cb4e2
Commit
8b4cb4e2
authored
May 11, 2021
by
earndt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AFP-108]
👷
Makes changes to Dockerfile for Azure deployment [
@earndt
]
parent
68388055
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
20 deletions
+44
-20
Dockerfile
Dockerfile
+23
-9
nginx.conf
nginx/nginx.conf
+21
-11
No files found.
Dockerfile
View file @
8b4cb4e2
FROM
node:1
3.12.0-alpine
as build
FROM
node:1
4.16-alpine3.13
as build
WORKDIR
/app
ENV
PATH /app/node_modules/.bin:$PATH
COPY
package.json ./
COPY
package-lock.json ./
RUN
npm ci
RUN
npm
install
react-scripts@3.4.1
-g
COPY
. ./
RUN
npm run build
COPY
. .
RUN
yarn
RUN
yarn build
FROM
nginx:stable-alpine
COPY
--from=build /app/build /usr/share/nginx/html
COPY
nginx/nginx.conf /etc/nginx/conf.d/default.conf
COPY
--from=build /app/
nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE
80
CMD
["nginx", "-g", "daemon off;"]
\ No newline at end of file
CMD
["nginx", "-g", "daemon off;"]
####BELOW IS FOR TESTING ONLY, DO NOT UNCOMMENT
#FROM node:13.12.0-alpine as build
#WORKDIR /app
#ENV PATH /app/node_modules/.bin:$PATH
#COPY package.json ./
#COPY package-lock.json ./
#RUN npm ci
#RUN npm install react-scripts@3.4.1 -g
#COPY . ./
#RUN npm run build
#FROM nginx:stable-alpine
#COPY --from=build /app/build /usr/share/nginx/html
#COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
#EXPOSE 80
#CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file
nginx/nginx.conf
View file @
8b4cb4e2
server
{
listen
80
;
location
/
{
root
/usr/share/nginx/html
;
index
index.html
index.htm
;
try_files
$uri
$uri
/
/index.html
=
404
;
}
}
listen
80
;
# server {
#
# listen 80;
location
/
{
root
/usr/share/nginx/html
;
index
index.html
index.htm
;
try_files
$uri
$uri
/
/index.html
;
}
#
location / {
#
root /usr/share/nginx/html;
#
index index.html index.htm;
#
try_files $uri $uri/ /index.html;
#
}
error_page
500
502
503
504
/50x.html
;
#
error_page 500 502 503 504 /50x.html;
location
=
/50x.html
{
root
/usr/share/nginx/html
;
}
#
location = /50x.html {
#
root /usr/share/nginx/html;
#
}
}
\ No newline at end of file
#
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment