Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
admin-gui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
custom-apps
admin-gui
Commits
700d7972
Commit
700d7972
authored
5 years ago
by
Alessandro Cerioni
Browse files
Options
Downloads
Patches
Plain Diff
Base href updated to /admin
parent
3bf80b86
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!16
v1.5.0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile
+15
-2
15 additions, 2 deletions
Dockerfile
angular.json
+1
-1
1 addition, 1 deletion
angular.json
docker-compose.yml
+4
-4
4 additions, 4 deletions
docker-compose.yml
nginx.conf.template
+8
-6
8 additions, 6 deletions
nginx.conf.template
with
28 additions
and
13 deletions
Dockerfile
+
15
−
2
View file @
700d7972
...
@@ -7,7 +7,14 @@ WORKDIR /app
...
@@ -7,7 +7,14 @@ WORKDIR /app
# Install npm dependencies
# Install npm dependencies
RUN
npm
install
RUN
npm
install
# Copy the project
# Copy the project
COPY
. /app
COPY
tsconfig.json /app
COPY
angular.json /app
COPY
patch.js /app
COPY
config /app/config
COPY
src /app/src
RUN
ls
/app
# Launch postinstall script (to include crypto module)
# Launch postinstall script (to include crypto module)
RUN
npm run postinstall
RUN
npm run postinstall
...
@@ -20,7 +27,13 @@ RUN npm run build:${conf}
...
@@ -20,7 +27,13 @@ RUN npm run build:${conf}
# Stage 1, based on Nginx, to have only the compiled app
# Stage 1, based on Nginx, to have only the compiled app
FROM
nginx
FROM
nginx
COPY
--from=builder /app/dist/admin-gui /usr/share/nginx/html
## Install dependency to get lua module in .conf
RUN
apt-get update
RUN
apt-get
--assume-yes
install
nginx-extras
RUN
rm
/etc/nginx/conf.d/
*
COPY
--from=builder /app/dist/admin-gui /usr/share/nginx/html/admin
RUN
ls
-l
/usr/share/nginx/html
RUN
ls
-l
/usr/share/nginx/html
EXPOSE
80
EXPOSE
80
...
...
This diff is collapsed.
Click to expand it.
angular.json
+
1
−
1
View file @
700d7972
...
@@ -145,4 +145,4 @@
...
@@ -145,4 +145,4 @@
"prefix"
:
"app"
"prefix"
:
"app"
}
}
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
4
−
4
View file @
700d7972
...
@@ -5,9 +5,9 @@ services:
...
@@ -5,9 +5,9 @@ services:
build
:
.
build
:
.
image
:
registry.alpha.grandlyon.com/refonte-data/admin-gui:${TAG}
image
:
registry.alpha.grandlyon.com/refonte-data/admin-gui:${TAG}
volumes
:
volumes
:
-
.
/nginx.conf.template:/etc/nginx/
conf.
d/default
.conf
-
${PWD}
/nginx.conf.template:/etc/nginx/
sites-enable
d/default
:ro
-
${CONFIG_FILE_PATH}:/usr/share/nginx/html/assets/config/config.json
-
${CONFIG_FILE_PATH}:/usr/share/nginx/html/assets/config/config.json
:ro
ports
:
ports
:
-
${APP_PORT}:80
-
${APP_PORT}:80
80
restart
:
unless-stopped
restart
:
unless-stopped
\ No newline at end of file
This diff is collapsed.
Click to expand it.
nginx.conf.template
+
8
−
6
View file @
700d7972
server {
server {
# staging server is listening on the port 8080
listen 8080;
listen 80 ;
server_name _;
server_name _;
root /usr/share/nginx/html/;
root /usr/share/nginx/html/;
location /admin {
location /admin/ {
try_files $uri$args /index.html;
try_files $uri$args /admin/index.html;
}
}
location / {
location / {
ngx.redirect("/admin/")
rewrite_by_lua '
}
ngx.redirect("/admin/")
';
}
}
}
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