Skip to content
Snippets Groups Projects
Commit 700d7972 authored by Alessandro Cerioni's avatar Alessandro Cerioni
Browse files

Base href updated to /admin

parent 3bf80b86
Branches
Tags
1 merge request!16v1.5.0
...@@ -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
......
...@@ -145,4 +145,4 @@ ...@@ -145,4 +145,4 @@
"prefix": "app" "prefix": "app"
} }
} }
} }
\ No newline at end of file
...@@ -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-enabled/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}:8080
restart: unless-stopped restart: unless-stopped
\ No newline at end of file
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/")
';
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment