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/
|
VOLUME /srv/htdocs-frontend/
|
||||||
|
|
||||||
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/frontend/frontend /srv/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
|
FROM nginx:stable-alpine
|
||||||
|
|
||||||
ENV FIC_BASEURL=/ \
|
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/fic-auth-docker.conf /etc/nginx/fic-auth.conf
|
||||||
COPY configs/nginx-docker.conf /etc/nginx/templates/default.conf.template
|
COPY configs/nginx-docker.conf /etc/nginx/templates/default.conf.template
|
||||||
|
|
||||||
COPY frontend/static /srv/htdocs-frontend
|
COPY --from=nodebuild /ui/build/ /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/
|
|
||||||
|
@ -88,11 +88,6 @@ server {
|
|||||||
|
|
||||||
rewrite ^/.*$ /index.html;
|
rewrite ^/.*$ /index.html;
|
||||||
}
|
}
|
||||||
location /issue {
|
|
||||||
include fic-auth.conf;
|
|
||||||
|
|
||||||
rewrite ^/.*$ /index.html;
|
|
||||||
}
|
|
||||||
location /issues {
|
location /issues {
|
||||||
include fic-auth.conf;
|
include fic-auth.conf;
|
||||||
|
|
||||||
@ -185,18 +180,18 @@ server {
|
|||||||
proxy_set_header X-FIC-Team $team;
|
proxy_set_header X-FIC-Team $team;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
}
|
}
|
||||||
location /submit/issue {
|
location /issue {
|
||||||
include fic-auth.conf;
|
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-Forwarded-For $remote_addr;
|
||||||
proxy_set_header X-FIC-Team $team;
|
proxy_set_header X-FIC-Team $team;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
}
|
}
|
||||||
location /submit/name {
|
location /chname {
|
||||||
include fic-auth.conf;
|
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-Forwarded-For $remote_addr;
|
||||||
proxy_set_header X-FIC-Team $team;
|
proxy_set_header X-FIC-Team $team;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
@ -57,8 +57,8 @@ server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
location ${FIC_BASEURL} {
|
location ${FIC_BASEURL2} {
|
||||||
rewrite ^${FIC_BASEURL}(.*)$ /$1;
|
rewrite ^${FIC_BASEURL2}(.*)$ /$1;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^/[A-Z] {
|
location ~ ^/[A-Z] {
|
||||||
@ -72,11 +72,6 @@ server {
|
|||||||
|
|
||||||
rewrite ^/.*$ /index.html;
|
rewrite ^/.*$ /index.html;
|
||||||
}
|
}
|
||||||
location /issue {
|
|
||||||
include fic-auth.conf;
|
|
||||||
|
|
||||||
rewrite ^/.*$ /index.html;
|
|
||||||
}
|
|
||||||
location /issues {
|
location /issues {
|
||||||
include fic-auth.conf;
|
include fic-auth.conf;
|
||||||
|
|
||||||
@ -164,18 +159,18 @@ server {
|
|||||||
proxy_set_header X-FIC-Team $team;
|
proxy_set_header X-FIC-Team $team;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
}
|
}
|
||||||
location /submit/issue {
|
location /issue {
|
||||||
include fic-auth.conf;
|
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-Forwarded-For $remote_addr;
|
||||||
proxy_set_header X-FIC-Team $team;
|
proxy_set_header X-FIC-Team $team;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
}
|
}
|
||||||
location /submit/name {
|
location /chname {
|
||||||
include fic-auth.conf;
|
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-Forwarded-For $remote_addr;
|
||||||
proxy_set_header X-FIC-Team $team;
|
proxy_set_header X-FIC-Team $team;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
@ -80,11 +80,6 @@ server {
|
|||||||
|
|
||||||
rewrite ^/.*$ /index.html;
|
rewrite ^/.*$ /index.html;
|
||||||
}
|
}
|
||||||
location /issue {
|
|
||||||
include fic-auth.conf;
|
|
||||||
|
|
||||||
rewrite ^/.*$ /index.html;
|
|
||||||
}
|
|
||||||
location /issues {
|
location /issues {
|
||||||
include fic-auth.conf;
|
include fic-auth.conf;
|
||||||
|
|
||||||
@ -177,18 +172,18 @@ server {
|
|||||||
proxy_set_header X-FIC-Team $team;
|
proxy_set_header X-FIC-Team $team;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
}
|
}
|
||||||
location /submit/issue {
|
location /issue {
|
||||||
include fic-auth.conf;
|
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-Forwarded-For $remote_addr;
|
||||||
proxy_set_header X-FIC-Team $team;
|
proxy_set_header X-FIC-Team $team;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
}
|
}
|
||||||
location /submit/name {
|
location /chname {
|
||||||
include fic-auth.conf;
|
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-Forwarded-For $remote_addr;
|
||||||
proxy_set_header X-FIC-Team $team;
|
proxy_set_header X-FIC-Team $team;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
@ -13,7 +13,7 @@ services:
|
|||||||
- MYSQL_USER=fic
|
- MYSQL_USER=fic
|
||||||
- MYSQL_PASSWORD=fic
|
- MYSQL_PASSWORD=fic
|
||||||
|
|
||||||
fic-admin:
|
admin:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile-admin
|
dockerfile: Dockerfile-admin
|
||||||
@ -39,7 +39,7 @@ services:
|
|||||||
- MYSQL_HOST=mysql
|
- MYSQL_HOST=mysql
|
||||||
- FICCA_PASS
|
- FICCA_PASS
|
||||||
|
|
||||||
fic-backend:
|
backend:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile-backend
|
dockerfile: Dockerfile-backend
|
||||||
@ -58,7 +58,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- MYSQL_HOST=mysql
|
- MYSQL_HOST=mysql
|
||||||
|
|
||||||
fic-qa:
|
qa:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile-qa
|
dockerfile: Dockerfile-qa
|
||||||
@ -77,7 +77,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- MYSQL_HOST=mysql
|
- MYSQL_HOST=mysql
|
||||||
|
|
||||||
fic-frontend:
|
frontend:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile-frontend
|
dockerfile: Dockerfile-frontend
|
||||||
@ -95,9 +95,9 @@ services:
|
|||||||
- submissions:/srv/submissions
|
- submissions:/srv/submissions
|
||||||
- startingblock:/srv/startingblock
|
- startingblock:/srv/startingblock
|
||||||
depends_on:
|
depends_on:
|
||||||
- fic-backend
|
- backend
|
||||||
|
|
||||||
fic-dashboard:
|
dashboard:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile-dashboard
|
dockerfile: Dockerfile-dashboard
|
||||||
@ -112,26 +112,29 @@ services:
|
|||||||
- teams:/srv/TEAMS:ro
|
- teams:/srv/TEAMS:ro
|
||||||
- settings:/srv/SETTINGS:ro
|
- settings:/srv/SETTINGS:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- fic-backend
|
- backend
|
||||||
|
|
||||||
front:
|
front:
|
||||||
image: nginx:latest
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile-nginx
|
||||||
|
image: nemunaire/fic-nginx:latest
|
||||||
ports:
|
ports:
|
||||||
- "8042:80"
|
- "8042:80"
|
||||||
networks:
|
networks:
|
||||||
- fic-net
|
- fic-net
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/fic:/mnt/fic:ro
|
- /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
|
- files:/srv/FILES:ro
|
||||||
- settings:/srv/SETTINGS:ro
|
- settings:/srv/SETTINGS:ro
|
||||||
- teams:/srv/TEAMS:ro
|
- teams:/srv/TEAMS:ro
|
||||||
- startingblock:/srv/startingblock:ro
|
- startingblock:/srv/startingblock:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- fic-frontend
|
- qa
|
||||||
- fic-admin
|
- frontend
|
||||||
|
- dashboard
|
||||||
|
- backend
|
||||||
|
- admin
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysql-data:
|
mysql-data:
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
[ -s /chbase-done ] && CURRENT_BASE=$(cat /chbase-done) || CURRENT_BASE="/"
|
[ -s /chbase-done ] && CURRENT_BASE=$(cat /chbase-done) || CURRENT_BASE="/"
|
||||||
[ -n "${BASEURL}" ] || BASEURL="/"
|
[ -n "${BASEURL}" ] || BASEURL="/"
|
||||||
|
[ "${BASEURL}" == "/" ] && BASEURL2="@baseurl" || BASEURL2="${BASEURL}"
|
||||||
|
|
||||||
run() {
|
run() {
|
||||||
local NEWBASE=$1
|
local NEWBASE=$1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user