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
No related branches found
No related tags found
1 merge request!16v1.5.0
......@@ -7,7 +7,14 @@ WORKDIR /app
# Install npm dependencies
RUN npm install
# 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)
RUN npm run postinstall
......@@ -20,7 +27,13 @@ RUN npm run build:${conf}
# Stage 1, based on Nginx, to have only the compiled app
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
EXPOSE 80
......
......@@ -145,4 +145,4 @@
"prefix": "app"
}
}
}
\ No newline at end of file
}
......@@ -5,9 +5,9 @@ services:
build: .
image: registry.alpha.grandlyon.com/refonte-data/admin-gui:${TAG}
volumes:
- ./nginx.conf.template:/etc/nginx/conf.d/default.conf
- ${CONFIG_FILE_PATH}:/usr/share/nginx/html/assets/config/config.json
- ${PWD}/nginx.conf.template:/etc/nginx/sites-enabled/default:ro
- ${CONFIG_FILE_PATH}:/usr/share/nginx/html/assets/config/config.json:ro
ports:
- ${APP_PORT}:80
- ${APP_PORT}:8080
restart: unless-stopped
\ No newline at end of file
server {
# staging server is listening on the port 8080
listen 80 ;
listen 8080;
server_name _;
root /usr/share/nginx/html/;
location /admin {
try_files $uri$args /index.html;
location /admin/ {
try_files $uri$args /admin/index.html;
}
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