Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ce-deploy-ui
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ccce
dev
ce-deploy-ui
Commits
fac73440
Commit
fac73440
authored
3 years ago
by
Imre Toth
Browse files
Options
Downloads
Patches
Plain Diff
Building, and serving web UI via NGINX
parent
fcac211d
No related branches found
No related tags found
1 merge request
!52
Building, and serving web UI via NGINX
Pipeline
#88960
passed
3 years ago
Stage: build
Stage: lint
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+19
-5
19 additions, 5 deletions
Dockerfile
docker/default.conf
+8
-0
8 additions, 0 deletions
docker/default.conf
with
27 additions
and
5 deletions
Dockerfile
+
19
−
5
View file @
fac73440
FROM
node:alpine
# build CCCE Frontend
MAINTAINER
John Sparger
FROM
node:14.15.4
as
builder
RUN
mkdir
/usr/src/app
WORKDIR
/usr/src/app
ENV
PATH /usr/src/app/node_modules/.bin:$PATH
COPY
package.json /usr/src/app/
RUN
npm
install
RUN
npm
install
react-scripts@4.0.1
-g
COPY
. /usr/src/app
ENV
PUBLIC_URL "/"
ENV
REACT_APP_LOGIN_METHOD "STD"
RUN
npm run build
RUN
mkdir
/web
# production environment
WORKDIR
/web
FROM
nginx:1.19.6-alpine
RUN
rm
-rf
/etc/nginx/conf.d
RUN
mkdir
/etc/nginx/conf.d
COPY
docker/default.conf /etc/nginx/conf.d
COPY
--from=builder /usr/src/app/build /usr/share/nginx/html/
EXPOSE
8080
EXPOSE
8080
CMD
PORT=8080 /usr/local/bin/npm start
CMD
["nginx", "-g", "daemon off;"]
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker/default.conf
0 → 100644
+
8
−
0
View file @
fac73440
server
{
listen
8080
;
location
/ {
root
/
usr
/
share
/
nginx
/
html
;
index
index
.
html
;
try_files
$
uri
$
uri
/ /
index
.
html
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment