configs: Update scripts and config for new ui
This commit is contained in:
parent
74e8c3801a
commit
102a0878ac
@ -27,9 +27,3 @@ COPY entrypoint-frontend.sh /usr/sbin/entrypoint.sh
|
||||
VOLUME /srv/htdocs-frontend/
|
||||
|
||||
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/frontend/frontend /srv/frontend
|
||||
COPY frontend/static /srv/htdocs-frontend
|
||||
|
||||
COPY frontend/static/css/glyphicon.css /srv/htdocs-frontend/css/
|
||||
COPY admin/static/fonts/* /srv/htdocs-frontend/fonts/
|
||||
COPY frontend/static/js/angular.min.js frontend/static/js/angular-route.min.js frontend/static/js/angular-sanitize.min.js frontend/static/js/bootstrap.min.js frontend/static/js/common.js frontend/static/js/d3.v3.min.js frontend/static/js/jquery.min.js /srv/htdocs-frontend/js/
|
||||
COPY admin/static/js/i18n/* /srv/htdocs-frontend/js/i18n/
|
||||
|
@ -1,3 +1,15 @@
|
||||
FROM node:lts-alpine as nodebuild
|
||||
|
||||
WORKDIR /ui
|
||||
|
||||
RUN apk --no-cache add python2 build-base
|
||||
|
||||
COPY frontend/ui/ .
|
||||
|
||||
RUN npm install --network-timeout100000
|
||||
RUN npm run build
|
||||
|
||||
|
||||
FROM nginx:stable-alpine
|
||||
|
||||
ENV FIC_BASEURL=/ \
|
||||
@ -11,10 +23,4 @@ COPY configs/nginx-chbase.sh /docker-entrypoint.d/40-update-baseurl.sh
|
||||
COPY configs/fic-auth-docker.conf /etc/nginx/fic-auth.conf
|
||||
COPY configs/nginx-docker.conf /etc/nginx/templates/default.conf.template
|
||||
|
||||
COPY frontend/static /srv/htdocs-frontend
|
||||
|
||||
# Dereference symlink
|
||||
COPY frontend/static/css/glyphicon.css /srv/htdocs-frontend/css/
|
||||
COPY admin/static/fonts/* /srv/htdocs-frontend/fonts/
|
||||
COPY frontend/static/js/angular.min.js frontend/static/js/angular-route.min.js frontend/static/js/angular-sanitize.min.js frontend/static/js/bootstrap.min.js frontend/static/js/common.js frontend/static/js/d3.v3.min.js frontend/static/js/jquery.min.js /srv/htdocs-frontend/js/
|
||||
COPY admin/static/js/i18n/* /srv/htdocs-frontend/js/i18n/
|
||||
COPY --from=nodebuild /ui/build/ /srv/htdocs-frontend
|
||||
|
@ -88,11 +88,6 @@ server {
|
||||
|
||||
rewrite ^/.*$ /index.html;
|
||||
}
|
||||
location /issue {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/.*$ /index.html;
|
||||
}
|
||||
location /issues {
|
||||
include fic-auth.conf;
|
||||
|
||||
@ -185,18 +180,18 @@ server {
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /submit/issue {
|
||||
location /issue {
|
||||
include fic-auth.conf;
|
||||
|
||||
proxy_pass http://frontend:8080/issue;
|
||||
proxy_pass http://frontend:8080;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /submit/name {
|
||||
location /chname {
|
||||
include fic-auth.conf;
|
||||
|
||||
proxy_pass http://frontend:8080/chname;
|
||||
proxy_pass http://frontend:8080;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
|
@ -57,8 +57,8 @@ server {
|
||||
}
|
||||
}
|
||||
|
||||
location ${FIC_BASEURL} {
|
||||
rewrite ^${FIC_BASEURL}(.*)$ /$1;
|
||||
location ${FIC_BASEURL2} {
|
||||
rewrite ^${FIC_BASEURL2}(.*)$ /$1;
|
||||
}
|
||||
|
||||
location ~ ^/[A-Z] {
|
||||
@ -72,11 +72,6 @@ server {
|
||||
|
||||
rewrite ^/.*$ /index.html;
|
||||
}
|
||||
location /issue {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/.*$ /index.html;
|
||||
}
|
||||
location /issues {
|
||||
include fic-auth.conf;
|
||||
|
||||
@ -164,18 +159,18 @@ server {
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /submit/issue {
|
||||
location /issue {
|
||||
include fic-auth.conf;
|
||||
|
||||
proxy_pass http://${HOST_FRONTEND}/issue;
|
||||
proxy_pass http://${HOST_FRONTEND};
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /submit/name {
|
||||
location /chname {
|
||||
include fic-auth.conf;
|
||||
|
||||
proxy_pass http://${HOST_FRONTEND}/chname;
|
||||
proxy_pass http://${HOST_FRONTEND};
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
|
@ -80,11 +80,6 @@ server {
|
||||
|
||||
rewrite ^/.*$ /index.html;
|
||||
}
|
||||
location /issue {
|
||||
include fic-auth.conf;
|
||||
|
||||
rewrite ^/.*$ /index.html;
|
||||
}
|
||||
location /issues {
|
||||
include fic-auth.conf;
|
||||
|
||||
@ -177,18 +172,18 @@ server {
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /submit/issue {
|
||||
location /issue {
|
||||
include fic-auth.conf;
|
||||
|
||||
proxy_pass http://frontend:8080/issue;
|
||||
proxy_pass http://frontend:8080;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /submit/name {
|
||||
location /chname {
|
||||
include fic-auth.conf;
|
||||
|
||||
proxy_pass http://frontend:8080/chname;
|
||||
proxy_pass http://frontend:8080;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-FIC-Team $team;
|
||||
proxy_redirect off;
|
||||
|
@ -13,7 +13,7 @@ services:
|
||||
- MYSQL_USER=fic
|
||||
- MYSQL_PASSWORD=fic
|
||||
|
||||
fic-admin:
|
||||
admin:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-admin
|
||||
@ -39,7 +39,7 @@ services:
|
||||
- MYSQL_HOST=mysql
|
||||
- FICCA_PASS
|
||||
|
||||
fic-backend:
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-backend
|
||||
@ -58,7 +58,7 @@ services:
|
||||
environment:
|
||||
- MYSQL_HOST=mysql
|
||||
|
||||
fic-qa:
|
||||
qa:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-qa
|
||||
@ -77,7 +77,7 @@ services:
|
||||
environment:
|
||||
- MYSQL_HOST=mysql
|
||||
|
||||
fic-frontend:
|
||||
frontend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-frontend
|
||||
@ -95,9 +95,9 @@ services:
|
||||
- submissions:/srv/submissions
|
||||
- startingblock:/srv/startingblock
|
||||
depends_on:
|
||||
- fic-backend
|
||||
- backend
|
||||
|
||||
fic-dashboard:
|
||||
dashboard:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-dashboard
|
||||
@ -112,26 +112,29 @@ services:
|
||||
- teams:/srv/TEAMS:ro
|
||||
- settings:/srv/SETTINGS:ro
|
||||
depends_on:
|
||||
- fic-backend
|
||||
- backend
|
||||
|
||||
front:
|
||||
image: nginx:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-nginx
|
||||
image: nemunaire/fic-nginx:latest
|
||||
ports:
|
||||
- "8042:80"
|
||||
networks:
|
||||
- fic-net
|
||||
volumes:
|
||||
- /mnt/fic:/mnt/fic:ro
|
||||
- ./configs/nginx-frontend-htpasswd.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- ./configs/nginx-fic.conf:/etc/nginx/auth.conf:ro
|
||||
- htdocs:/srv/htdocs-frontend:ro
|
||||
- files:/srv/FILES:ro
|
||||
- settings:/srv/SETTINGS:ro
|
||||
- teams:/srv/TEAMS:ro
|
||||
- startingblock:/srv/startingblock:ro
|
||||
depends_on:
|
||||
- fic-frontend
|
||||
- fic-admin
|
||||
- qa
|
||||
- frontend
|
||||
- dashboard
|
||||
- backend
|
||||
- admin
|
||||
|
||||
volumes:
|
||||
mysql-data:
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
[ -s /chbase-done ] && CURRENT_BASE=$(cat /chbase-done) || CURRENT_BASE="/"
|
||||
[ -n "${BASEURL}" ] || BASEURL="/"
|
||||
[ "${BASEURL}" == "/" ] && BASEURL2="@baseurl" || BASEURL2="${BASEURL}"
|
||||
|
||||
run() {
|
||||
local NEWBASE=$1
|
||||
|
Loading…
x
Reference in New Issue
Block a user