Rename frontend as receiver
@ -2,10 +2,10 @@ admin/admin
|
|||||||
backend/backend
|
backend/backend
|
||||||
dashboard/dashboard
|
dashboard/dashboard
|
||||||
evdist/evdist
|
evdist/evdist
|
||||||
frontend/frontend
|
receiver/receiver
|
||||||
repochecker/repochecker
|
repochecker/repochecker
|
||||||
frontend/ui/build
|
frontend/fic/build
|
||||||
frontend/ui/node_modules
|
frontend/fic/node_modules
|
||||||
qa/ui/build
|
qa/ui/build
|
||||||
qa/ui/node_modules
|
qa/ui/node_modules
|
||||||
fickit-backend-initrd.img
|
fickit-backend-initrd.img
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
image: nemunaire/fic-frontend:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
image: nemunaire/fic-receiver:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||||
{{#if build.tags}}
|
{{#if build.tags}}
|
||||||
tags:
|
tags:
|
||||||
{{#each build.tags}}
|
{{#each build.tags}}
|
||||||
@ -6,16 +6,16 @@ tags:
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
manifests:
|
manifests:
|
||||||
- image: nemunaire/fic-frontend:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
- image: nemunaire/fic-receiver:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||||
platform:
|
platform:
|
||||||
architecture: amd64
|
architecture: amd64
|
||||||
os: linux
|
os: linux
|
||||||
- image: nemunaire/fic-frontend:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
- image: nemunaire/fic-receiver:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
||||||
platform:
|
platform:
|
||||||
architecture: arm64
|
architecture: arm64
|
||||||
os: linux
|
os: linux
|
||||||
variant: v8
|
variant: v8
|
||||||
- image: nemunaire/fic-frontend:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
|
- image: nemunaire/fic-receiver:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
|
||||||
platform:
|
platform:
|
||||||
architecture: arm
|
architecture: arm
|
||||||
os: linux
|
os: linux
|
40
.drone.yml
@ -19,7 +19,7 @@ steps:
|
|||||||
- go get -v -d srs.epita.fr/fic-server/admin
|
- go get -v -d srs.epita.fr/fic-server/admin
|
||||||
- go get -v -d srs.epita.fr/fic-server/backend
|
- go get -v -d srs.epita.fr/fic-server/backend
|
||||||
- go get -v -d srs.epita.fr/fic-server/evdist
|
- go get -v -d srs.epita.fr/fic-server/evdist
|
||||||
- go get -v -d srs.epita.fr/fic-server/frontend
|
- go get -v -d srs.epita.fr/fic-server/receiver
|
||||||
- go get -v -d srs.epita.fr/fic-server/dashboard
|
- go get -v -d srs.epita.fr/fic-server/dashboard
|
||||||
- go get -v -d srs.epita.fr/fic-server/repochecker
|
- go get -v -d srs.epita.fr/fic-server/repochecker
|
||||||
- go get -v -d srs.epita.fr/fic-server/repochecker/epita
|
- go get -v -d srs.epita.fr/fic-server/repochecker/epita
|
||||||
@ -50,7 +50,7 @@ steps:
|
|||||||
- go vet -v -buildvcs=false srs.epita.fr/fic-server/admin
|
- go vet -v -buildvcs=false srs.epita.fr/fic-server/admin
|
||||||
- go vet -v -buildvcs=false srs.epita.fr/fic-server/backend
|
- go vet -v -buildvcs=false srs.epita.fr/fic-server/backend
|
||||||
- go vet -v -buildvcs=false srs.epita.fr/fic-server/evdist
|
- go vet -v -buildvcs=false srs.epita.fr/fic-server/evdist
|
||||||
- go vet -v -buildvcs=false srs.epita.fr/fic-server/frontend
|
- go vet -v -buildvcs=false srs.epita.fr/fic-server/receiver
|
||||||
- go vet -v -buildvcs=false srs.epita.fr/fic-server/dashboard
|
- go vet -v -buildvcs=false srs.epita.fr/fic-server/dashboard
|
||||||
- go vet -v -buildvcs=false srs.epita.fr/fic-server/repochecker
|
- go vet -v -buildvcs=false srs.epita.fr/fic-server/repochecker
|
||||||
- go vet -v -buildvcs=false srs.epita.fr/fic-server/repochecker/epita
|
- go vet -v -buildvcs=false srs.epita.fr/fic-server/repochecker/epita
|
||||||
@ -84,21 +84,21 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
|
|
||||||
- name: build frontend
|
- name: build receiver
|
||||||
image: golang:alpine
|
image: golang:alpine
|
||||||
commands:
|
commands:
|
||||||
- go build -v -buildvcs=false -o deploy/frontend-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/frontend
|
- go build -v -buildvcs=false -o deploy/receiver-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/receiver
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
|
|
||||||
- name: build frontend ui
|
- name: build frontend fic ui
|
||||||
image: node:20-alpine
|
image: node:20-alpine
|
||||||
commands:
|
commands:
|
||||||
- cd frontend/ui
|
- cd frontend/fic
|
||||||
- npm install --network-timeout=100000
|
- npm install --network-timeout=100000
|
||||||
- sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte
|
- sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte
|
||||||
- npm run build
|
- npm run build
|
||||||
- tar chjf ../../deploy/htdocs-frontend.tar.bz2 build
|
- tar chjf ../../deploy/htdocs-frontend-fic.tar.bz2 build
|
||||||
|
|
||||||
- name: build dashboard
|
- name: build dashboard
|
||||||
image: golang:alpine
|
image: golang:alpine
|
||||||
@ -206,17 +206,17 @@ steps:
|
|||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
- name: docker frontend
|
- name: docker receiver
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
repo: nemunaire/fic-frontend
|
repo: nemunaire/fic-receiver
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||||
dockerfile: Dockerfile-frontend
|
dockerfile: Dockerfile-receiver
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
@ -353,7 +353,7 @@ steps:
|
|||||||
- go get -v -d srs.epita.fr/fic-server/admin
|
- go get -v -d srs.epita.fr/fic-server/admin
|
||||||
- go get -v -d srs.epita.fr/fic-server/backend
|
- go get -v -d srs.epita.fr/fic-server/backend
|
||||||
- go get -v -d srs.epita.fr/fic-server/evdist
|
- go get -v -d srs.epita.fr/fic-server/evdist
|
||||||
- go get -v -d srs.epita.fr/fic-server/frontend
|
- go get -v -d srs.epita.fr/fic-server/receiver
|
||||||
- go get -v -d srs.epita.fr/fic-server/dashboard
|
- go get -v -d srs.epita.fr/fic-server/dashboard
|
||||||
|
|
||||||
- name: build admin
|
- name: build admin
|
||||||
@ -378,17 +378,17 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
|
|
||||||
- name: build frontend
|
- name: build receiver
|
||||||
image: golang:alpine
|
image: golang:alpine
|
||||||
commands:
|
commands:
|
||||||
- go build -v -buildvcs=false -o deploy/frontend-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/frontend
|
- go build -v -buildvcs=false -o deploy/receiver-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/receiver
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
|
|
||||||
- name: build frontend ui
|
- name: build frontend fic ui
|
||||||
image: node:20-alpine
|
image: node:20-alpine
|
||||||
commands:
|
commands:
|
||||||
- cd frontend/ui
|
- cd frontend/fic
|
||||||
- npm install --network-timeout=100000
|
- npm install --network-timeout=100000
|
||||||
- sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte
|
- sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte
|
||||||
- npm run build
|
- npm run build
|
||||||
@ -502,17 +502,17 @@ steps:
|
|||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
- name: docker frontend
|
- name: docker receiver
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
repo: nemunaire/fic-frontend
|
repo: nemunaire/fic-receiver
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||||
dockerfile: Dockerfile-frontend
|
dockerfile: Dockerfile-receiver
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
@ -620,12 +620,12 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
|
|
||||||
- name: publish frontend
|
- name: publish receiver
|
||||||
image: plugins/manifest
|
image: plugins/manifest
|
||||||
settings:
|
settings:
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
ignore_missing: true
|
ignore_missing: true
|
||||||
spec: .drone-manifest-fic-frontend.yml
|
spec: .drone-manifest-fic-receiver.yml
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
|
@ -27,6 +27,6 @@ COPY --from=gobuild /go/src/srs.epita.fr/fic-server/dashboard/dashboard /srv/das
|
|||||||
COPY dashboard/static/index.html /srv/htdocs-dashboard/
|
COPY dashboard/static/index.html /srv/htdocs-dashboard/
|
||||||
COPY admin/static/css/bootstrap.min.css dashboard/static/css/fic.css admin/static/css/glyphicon.css /srv/htdocs-dashboard/css/
|
COPY admin/static/css/bootstrap.min.css dashboard/static/css/fic.css admin/static/css/glyphicon.css /srv/htdocs-dashboard/css/
|
||||||
COPY admin/static/fonts /srv/htdocs-dashboard/fonts
|
COPY admin/static/fonts /srv/htdocs-dashboard/fonts
|
||||||
COPY frontend/ui/static/img/ dashboard/static/img/srs.png /srv/htdocs-dashboard/img/
|
COPY frontend/fic/static/img/ dashboard/static/img/srs.png /srv/htdocs-dashboard/img/
|
||||||
COPY dashboard/static/js/dashboard.js admin/static/js/angular.min.js dashboard/static/js/angular-animate.min.js admin/static/js/angular-route.min.js admin/static/js/angular-sanitize.min.js admin/static/js/bootstrap.min.js admin/static/js/common.js admin/static/js/d3.v3.min.js admin/static/js/jquery.min.js /srv/htdocs-dashboard/js/
|
COPY dashboard/static/js/dashboard.js admin/static/js/angular.min.js dashboard/static/js/angular-animate.min.js admin/static/js/angular-route.min.js admin/static/js/angular-sanitize.min.js admin/static/js/bootstrap.min.js admin/static/js/common.js admin/static/js/d3.v3.min.js admin/static/js/jquery.min.js /srv/htdocs-dashboard/js/
|
||||||
COPY admin/static/js/i18n/* /srv/htdocs-dashboard/js/i18n/
|
COPY admin/static/js/i18n/* /srv/htdocs-dashboard/js/i18n/
|
||||||
|
@ -2,7 +2,7 @@ FROM node:20-alpine as nodebuild
|
|||||||
|
|
||||||
WORKDIR /ui
|
WORKDIR /ui
|
||||||
|
|
||||||
COPY frontend/ui/ .
|
COPY frontend/fic/ .
|
||||||
|
|
||||||
RUN npm install --network-timeout=100000 && \
|
RUN npm install --network-timeout=100000 && \
|
||||||
sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte && \
|
sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte && \
|
||||||
|
@ -2,9 +2,7 @@ FROM node:19-alpine3.15 as nodebuild
|
|||||||
|
|
||||||
WORKDIR /ui
|
WORKDIR /ui
|
||||||
|
|
||||||
RUN apk --no-cache add python2 build-base
|
COPY frontend/fic/ .
|
||||||
|
|
||||||
COPY frontend/ui/ .
|
|
||||||
|
|
||||||
RUN npm install --network-timeout=100000 && \
|
RUN npm install --network-timeout=100000 && \
|
||||||
sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte && \
|
sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte && \
|
||||||
@ -14,7 +12,7 @@ RUN npm install --network-timeout=100000 && \
|
|||||||
FROM nginx:stable-alpine
|
FROM nginx:stable-alpine
|
||||||
|
|
||||||
ENV FIC_BASEURL=/ \
|
ENV FIC_BASEURL=/ \
|
||||||
HOST_FRONTEND=frontend:8080 HOST_ADMIN=admin:8081 HOST_DASHBOARD=dashboard:8082 HOST_QA=qa:8083 \
|
HOST_RECEIVER=receiver:8080 HOST_ADMIN=admin:8081 HOST_DASHBOARD=dashboard:8082 HOST_QA=qa:8083 \
|
||||||
PATH_FILES=/srv/FILES PATH_STARTINGBLOCK=/srv/STARTINGBLOCK PATH_STATIC=/srv/htdocs-frontend PATH_SETTINGS=/srv/SETTINGSDIST PATH_SYNC=/srv/SYNC PATH_TEAMS=/srv/TEAMS
|
PATH_FILES=/srv/FILES PATH_STARTINGBLOCK=/srv/STARTINGBLOCK PATH_STATIC=/srv/htdocs-frontend PATH_SETTINGS=/srv/SETTINGSDIST PATH_SYNC=/srv/SYNC PATH_TEAMS=/srv/TEAMS
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
@ -7,10 +7,10 @@ WORKDIR /go/src/srs.epita.fr/fic-server/
|
|||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
COPY settings settings/
|
COPY settings settings/
|
||||||
COPY libfic ./libfic/
|
COPY libfic ./libfic/
|
||||||
COPY frontend ./frontend/
|
COPY receiver ./receiver/
|
||||||
|
|
||||||
RUN go get -d -v ./frontend && \
|
RUN go get -d -v ./receiver && \
|
||||||
go build -v -buildvcs=false -o ./frontend/frontend ./frontend
|
go build -v -buildvcs=false -o ./receiver/receiver ./receiver
|
||||||
|
|
||||||
|
|
||||||
FROM alpine:3.18
|
FROM alpine:3.18
|
||||||
@ -22,6 +22,6 @@ WORKDIR /srv
|
|||||||
ENTRYPOINT ["/usr/sbin/entrypoint.sh"]
|
ENTRYPOINT ["/usr/sbin/entrypoint.sh"]
|
||||||
CMD ["--bind=:8080"]
|
CMD ["--bind=:8080"]
|
||||||
|
|
||||||
COPY entrypoint-frontend.sh /usr/sbin/entrypoint.sh
|
COPY entrypoint-receiver.sh /usr/sbin/entrypoint.sh
|
||||||
|
|
||||||
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/frontend/frontend /srv/frontend
|
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/receiver/receiver /srv/receiver
|
@ -18,13 +18,13 @@ micro-services :
|
|||||||
- `evdist` is an inotify reacting service that handles settings
|
- `evdist` is an inotify reacting service that handles settings
|
||||||
changes during the challenge (eg. a 30 minutes event where hints are
|
changes during the challenge (eg. a 30 minutes event where hints are
|
||||||
free, ...).
|
free, ...).
|
||||||
- `frontend` is only responsible for receiving submissions. It is the
|
- `qa` is an interface dedicated to challenge development, it stores
|
||||||
|
reports to be treated by challenges creators.
|
||||||
|
- `receiver` is only responsible for receiving submissions. It is the
|
||||||
only dynamic part accessibe to players, so it's codebase is reduce
|
only dynamic part accessibe to players, so it's codebase is reduce
|
||||||
to the minimum. It does not parse or try to understand players
|
to the minimum. It does not parse or try to understand players
|
||||||
submissions, it just write it down to a file in the file
|
submissions, it just write it down to a file in the file
|
||||||
system. Parsing and treatment is made by the `backend`.
|
system. Parsing and treatment is made by the `backend`.
|
||||||
- `qa` is an interface dedicated to challenge development, it stores
|
|
||||||
reports to be treated by challenges creators.
|
|
||||||
- `remote/challenge-sync-airbus` is an inotify reacting service that
|
- `remote/challenge-sync-airbus` is an inotify reacting service that
|
||||||
allows us to synchronize scores and exercice validations with the
|
allows us to synchronize scores and exercice validations with the
|
||||||
Airbus scoring platform.
|
Airbus scoring platform.
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
Version de l'API : {{ v.version }}
|
Version de l'API : {{ v.version }}
|
||||||
</p>
|
</p>
|
||||||
<p ng-controller="TimestampController">
|
<p ng-controller="TimestampController">
|
||||||
Latence frontend-backend : <span ng-class="{'text-success': t.diffFB <= 1000000000, 'text-warning': t.diffFB > 1000000000, 'text-danger': t.diffFB > 1500000000}"><ng-pluralize count="t.diffFB / 1000000000" when="{'one': '{} seconde', 'other': '{} secondes'}"></ng-pluralize></span><br>
|
Latence frontal : <span ng-class="{'text-success': t.diffFB <= 1000000000, 'text-warning': t.diffFB > 1000000000, 'text-danger': t.diffFB > 1500000000}"><ng-pluralize count="t.diffFB / 1000000000" when="{'one': '{} seconde', 'other': '{} secondes'}"></ng-pluralize></span><br>
|
||||||
Dernière synchronisation du frontend : {{ t.frontend | date:"mediumTime" }}
|
Dernière synchronisation du frontal : {{ t.frontend | date:"mediumTime" }}
|
||||||
</p>
|
</p>
|
||||||
<ul class="pagination" ng-controller="SubmissionsStatsController">
|
<ul class="pagination" ng-controller="SubmissionsStatsController">
|
||||||
<li class="page-item" title="Nombre de soumissions la dernière minute"><a class="page-link">{{ submissionsstats.nbsubminute }}</a></li>
|
<li class="page-item" title="Nombre de soumissions la dernière minute"><a class="page-link">{{ submissionsstats.nbsubminute }}</a></li>
|
||||||
|
@ -189,7 +189,7 @@ server {
|
|||||||
location /submit/ {
|
location /submit/ {
|
||||||
include fic-auth.conf;
|
include fic-auth.conf;
|
||||||
|
|
||||||
proxy_pass http://frontend:8080/submission;
|
proxy_pass http://receiver:8080/submission;
|
||||||
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;
|
||||||
@ -197,7 +197,7 @@ server {
|
|||||||
location /issue {
|
location /issue {
|
||||||
include fic-auth.conf;
|
include fic-auth.conf;
|
||||||
|
|
||||||
proxy_pass http://frontend:8080;
|
proxy_pass http://receiver: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;
|
||||||
@ -205,7 +205,7 @@ server {
|
|||||||
location /chname {
|
location /chname {
|
||||||
include fic-auth.conf;
|
include fic-auth.conf;
|
||||||
|
|
||||||
proxy_pass http://frontend:8080;
|
proxy_pass http://receiver: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;
|
||||||
@ -213,7 +213,7 @@ server {
|
|||||||
location /registration {
|
location /registration {
|
||||||
include fic-auth.conf;
|
include fic-auth.conf;
|
||||||
|
|
||||||
proxy_pass http://frontend:8080;
|
proxy_pass http://receiver: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;
|
||||||
@ -221,7 +221,7 @@ server {
|
|||||||
location /openhint/ {
|
location /openhint/ {
|
||||||
include fic-auth.conf;
|
include fic-auth.conf;
|
||||||
|
|
||||||
proxy_pass http://frontend:8080;
|
proxy_pass http://receiver: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;
|
||||||
@ -229,7 +229,7 @@ server {
|
|||||||
location /wantchoices/ {
|
location /wantchoices/ {
|
||||||
include fic-auth.conf;
|
include fic-auth.conf;
|
||||||
|
|
||||||
proxy_pass http://frontend:8080;
|
proxy_pass http://receiver: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;
|
||||||
|
@ -170,7 +170,7 @@ server {
|
|||||||
location /submit/ {
|
location /submit/ {
|
||||||
include fic-get-team.conf;
|
include fic-get-team.conf;
|
||||||
|
|
||||||
proxy_pass http://${HOST_FRONTEND}/submission/;
|
proxy_pass http://${HOST_RECEIVER}/submission/;
|
||||||
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;
|
||||||
@ -178,7 +178,7 @@ server {
|
|||||||
location /issue {
|
location /issue {
|
||||||
include fic-get-team.conf;
|
include fic-get-team.conf;
|
||||||
|
|
||||||
proxy_pass http://${HOST_FRONTEND};
|
proxy_pass http://${HOST_RECEIVER};
|
||||||
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;
|
||||||
@ -186,7 +186,7 @@ server {
|
|||||||
location /chname {
|
location /chname {
|
||||||
include fic-get-team.conf;
|
include fic-get-team.conf;
|
||||||
|
|
||||||
proxy_pass http://${HOST_FRONTEND};
|
proxy_pass http://${HOST_RECEIVER};
|
||||||
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;
|
||||||
@ -194,7 +194,7 @@ server {
|
|||||||
location /registration {
|
location /registration {
|
||||||
include fic-get-team.conf;
|
include fic-get-team.conf;
|
||||||
|
|
||||||
proxy_pass http://${HOST_FRONTEND};
|
proxy_pass http://${HOST_RECEIVER};
|
||||||
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;
|
||||||
@ -202,7 +202,7 @@ server {
|
|||||||
location /openhint/ {
|
location /openhint/ {
|
||||||
include fic-get-team.conf;
|
include fic-get-team.conf;
|
||||||
|
|
||||||
proxy_pass http://${HOST_FRONTEND};
|
proxy_pass http://${HOST_RECEIVER};
|
||||||
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;
|
||||||
@ -210,7 +210,7 @@ server {
|
|||||||
location /wantchoices/ {
|
location /wantchoices/ {
|
||||||
include fic-get-team.conf;
|
include fic-get-team.conf;
|
||||||
|
|
||||||
proxy_pass http://${HOST_FRONTEND};
|
proxy_pass http://${HOST_RECEIVER};
|
||||||
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;
|
||||||
|
@ -179,7 +179,7 @@ server {
|
|||||||
location /submit/ {
|
location /submit/ {
|
||||||
include fic-get-team.conf;
|
include fic-get-team.conf;
|
||||||
|
|
||||||
proxy_pass http://frontend:8080/submission/;
|
proxy_pass http://receiver:8080/submission/;
|
||||||
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;
|
||||||
@ -187,7 +187,7 @@ server {
|
|||||||
location /issue {
|
location /issue {
|
||||||
include fic-get-team.conf;
|
include fic-get-team.conf;
|
||||||
|
|
||||||
proxy_pass http://frontend:8080;
|
proxy_pass http://receiver: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;
|
||||||
@ -195,7 +195,7 @@ server {
|
|||||||
location /chname {
|
location /chname {
|
||||||
include fic-get-team.conf;
|
include fic-get-team.conf;
|
||||||
|
|
||||||
proxy_pass http://frontend:8080;
|
proxy_pass http://receiver: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;
|
||||||
@ -203,7 +203,7 @@ server {
|
|||||||
location /registration {
|
location /registration {
|
||||||
include fic-get-team.conf;
|
include fic-get-team.conf;
|
||||||
|
|
||||||
proxy_pass http://frontend:8080;
|
proxy_pass http://receiver: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;
|
||||||
@ -211,7 +211,7 @@ server {
|
|||||||
location /openhint/ {
|
location /openhint/ {
|
||||||
include fic-get-team.conf;
|
include fic-get-team.conf;
|
||||||
|
|
||||||
proxy_pass http://frontend:8080;
|
proxy_pass http://receiver: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;
|
||||||
@ -219,7 +219,7 @@ server {
|
|||||||
location /wantchoices/ {
|
location /wantchoices/ {
|
||||||
include fic-get-team.conf;
|
include fic-get-team.conf;
|
||||||
|
|
||||||
proxy_pass http://frontend:8080;
|
proxy_pass http://receiver: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;
|
||||||
|
@ -89,11 +89,11 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- MYSQL_HOST=mysql
|
- MYSQL_HOST=mysql
|
||||||
|
|
||||||
frontend:
|
receiver:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile-frontend
|
dockerfile: Dockerfile-receiver
|
||||||
image: nemunaire/fic-frontend:latest
|
image: nemunaire/fic-receiver:latest
|
||||||
command: "-startedFile /srv/startingblock/started -bind :8080"
|
command: "-startedFile /srv/startingblock/started -bind :8080"
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
@ -144,7 +144,7 @@ services:
|
|||||||
- startingblock:/srv/STARTINGBLOCK:ro
|
- startingblock:/srv/STARTINGBLOCK:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- qa
|
- qa
|
||||||
- frontend
|
- receiver
|
||||||
- dashboard
|
- dashboard
|
||||||
- backend
|
- backend
|
||||||
- admin
|
- admin
|
||||||
|
@ -30,4 +30,4 @@ run() {
|
|||||||
echo "${BASEURL}" > /chbase-done
|
echo "${BASEURL}" > /chbase-done
|
||||||
}
|
}
|
||||||
|
|
||||||
exec /srv/frontend $@
|
exec /srv/receiver $@
|
@ -68,17 +68,17 @@ onboot:
|
|||||||
# - name: eth4
|
# - name: eth4
|
||||||
# - name: bond-frontal
|
# - name: bond-frontal
|
||||||
# add: bond
|
# add: bond
|
||||||
- name: frontend-ip-setup
|
- name: receiver-ip-setup
|
||||||
image: linuxkit/ip:c88e3272e3b12edec454e4720da8bb70a7655bc7
|
image: linuxkit/ip:c88e3272e3b12edec454e4720da8bb70a7655bc7
|
||||||
command: ["/bin/sh", "-c", "ip a add 172.17.1.3/24 dev vethin-frontend; ip link set vethin-frontend up;" ]
|
command: ["/bin/sh", "-c", "ip a add 172.17.1.3/24 dev vethin-receiver; ip link set vethin-receiver up;" ]
|
||||||
net: new
|
net: new
|
||||||
runtime:
|
runtime:
|
||||||
interfaces:
|
interfaces:
|
||||||
- name: vethin-frontend
|
- name: vethin-receiver
|
||||||
add: veth
|
add: veth
|
||||||
peer: veth-frontend
|
peer: veth-receiver
|
||||||
bindNS:
|
bindNS:
|
||||||
net: /run/netns/fic-frontend
|
net: /run/netns/fic-receiver
|
||||||
- name: sshd-ip-setup
|
- name: sshd-ip-setup
|
||||||
image: linuxkit/ip:c88e3272e3b12edec454e4720da8bb70a7655bc7
|
image: linuxkit/ip:c88e3272e3b12edec454e4720da8bb70a7655bc7
|
||||||
command: ["/bin/sh", "-c", "ip a add 10.10.10.2/29 dev eth2; ip link set eth2 up;" ]
|
command: ["/bin/sh", "-c", "ip a add 10.10.10.2/29 dev eth2; ip link set eth2 up;" ]
|
||||||
@ -101,7 +101,7 @@ onboot:
|
|||||||
net: /run/netns/auth
|
net: /run/netns/auth
|
||||||
- name: bridge-setup
|
- name: bridge-setup
|
||||||
image: linuxkit/ip:c88e3272e3b12edec454e4720da8bb70a7655bc7
|
image: linuxkit/ip:c88e3272e3b12edec454e4720da8bb70a7655bc7
|
||||||
command: ["/bin/sh", "-c", "ip a add 172.17.1.1/24 dev br0; ip link set veth-nginx master br0; ip link set veth-frontend master br0; ip link set veth-auth master br0; ip link set br0 up; ip link set veth-nginx up; ip link set veth-frontend up; ip link set veth-auth up;" ]
|
command: ["/bin/sh", "-c", "ip a add 172.17.1.1/24 dev br0; ip link set veth-nginx master br0; ip link set veth-receiver master br0; ip link set veth-auth master br0; ip link set br0 up; ip link set veth-nginx up; ip link set veth-receiver up; ip link set veth-auth up;" ]
|
||||||
runtime:
|
runtime:
|
||||||
interfaces:
|
interfaces:
|
||||||
- name: br0
|
- name: br0
|
||||||
@ -172,9 +172,9 @@ services:
|
|||||||
- /var/lib/fic/startingblock
|
- /var/lib/fic/startingblock
|
||||||
- /var/lib/fic/settingsdist
|
- /var/lib/fic/settingsdist
|
||||||
- /var/lib/fic/teams
|
- /var/lib/fic/teams
|
||||||
- name: fic-frontend
|
- name: fic-receiver
|
||||||
image: nemunaire/fic-frontend:latest@sha256:6bbecfaedd551fa6e6e13f741d7fa71291e495f3959dfd36d20b226007063f39
|
image: nemunaire/fic-receiver:latest@sha256:6bbecfaedd551fa6e6e13f741d7fa71291e495f3959dfd36d20b226007063f39
|
||||||
command: ["/srv/frontend", "-bind=:8080", "-startedFile=/srv/startingblock/started"]
|
command: ["/srv/receiver", "-bind=:8080", "-startedFile=/srv/startingblock/started"]
|
||||||
binds:
|
binds:
|
||||||
- /etc/hosts:/etc/hosts:ro
|
- /etc/hosts:/etc/hosts:ro
|
||||||
- /var/lib/fic/files:/srv/FILES:ro
|
- /var/lib/fic/files:/srv/FILES:ro
|
||||||
@ -182,7 +182,7 @@ services:
|
|||||||
- /var/lib/fic/startingblock:/srv/startingblock
|
- /var/lib/fic/startingblock:/srv/startingblock
|
||||||
- /var/lib/fic/submissions:/srv/submissions
|
- /var/lib/fic/submissions:/srv/submissions
|
||||||
- /var/lib/fic/teams:/srv/TEAMS:ro
|
- /var/lib/fic/teams:/srv/TEAMS:ro
|
||||||
net: /run/netns/fic-frontend
|
net: /run/netns/fic-receiver
|
||||||
runtime:
|
runtime:
|
||||||
mkdir:
|
mkdir:
|
||||||
- /var/lib/fic/files
|
- /var/lib/fic/files
|
||||||
|
@ -70,12 +70,12 @@
|
|||||||
installPhase = "mkdir -p $out/; cp -r configs/ $out/";
|
installPhase = "mkdir -p $out/; cp -r configs/ $out/";
|
||||||
};
|
};
|
||||||
|
|
||||||
fic-frontend = pkgs.buildGoModule {
|
fic-receiver = pkgs.buildGoModule {
|
||||||
pname = "frontend";
|
pname = "receiver";
|
||||||
inherit version vendorSha256 overrideModAttrs;
|
inherit version vendorSha256 overrideModAttrs;
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
subPackages = [ "frontend" ];
|
subPackages = [ "receiver" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fic-qa = pkgs.buildGoModule {
|
fic-qa = pkgs.buildGoModule {
|
||||||
|
1
frontend/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
frontend
|
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
1
receiver/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
receiver
|