Skip to content

Commit f769ac9

Browse files
author
Dimitri Korsch
committed
minor configuration updates
1 parent 0e76dee commit f769ac9

File tree

7 files changed

+12
-9
lines changed

7 files changed

+12
-9
lines changed

.env.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ MYSQL_USER=annot8
1010
MYSQL_PASSWORD=CHANGE_ME
1111
MYSQL_ROOT_PASSWORD=CHANGE_ME
1212
MYSQL_HOST=CHANGE_ME
13+
14+
REDIS_HOST=redis

backend/annot8/settings/security.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
]
3737

3838
FRONTEND_PORT = os.environ.get("FRONTEND_PORT", 8080)
39+
print(f"Used frontend port: {FRONTEND_PORT}")
3940

4041
CORS_ORIGIN_WHITELIST = (
4142
f'http://localhost:{FRONTEND_PORT}',
@@ -47,6 +48,7 @@
4748
CSRF_TRUSTED_ORIGINS = (
4849
'https://api.inf-cv.uni-jena.de',
4950
'https://annot8.dikorsch.de',
51+
'http://localhost:8082',
5052
)
5153

5254
CORS_ALLOW_HEADERS = list(default_headers) + [

frontend/.env.production

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
BACKEND_URL="https://annot8.dikorsch.de"
2-
BACKEND_URL="http://127.0.0.1"
3-
BACKEND_PORT=8000
2+
BACKEND_PORT=443
43
VUE_APP_API_URL="${BACKEND_URL}:${BACKEND_PORT}/annot8/api/v1"
54
VUE_APP_MEDIA_URL="${BACKEND_URL}:${BACKEND_PORT}"

scripts/docker/backend.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ WORKDIR /code
2121
# install dependencies
2222
COPY ./backend/requirements.txt /code/
2323
RUN python -m pip install --upgrade pip
24-
RUN pip install numpy uwsgi
24+
RUN pip install numpy~=1.23.5 uwsgi
2525
RUN pip install -r /code/requirements.txt
2626
RUN rm /code/requirements.txt
2727

scripts/docker/frontend.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARG GID=root
66
# build webui #
77
########################################
88

9-
FROM node:20 as builder
9+
FROM node:20 AS builder
1010

1111
# copy files
1212
COPY ./frontend /code
@@ -25,7 +25,7 @@ RUN npm run build
2525
# actuall webserver #
2626
########################################
2727

28-
FROM nginx as annot8_frontend
28+
FROM nginx AS annot8_frontend
2929

3030
COPY --from=builder /code/dist /usr/share/nginx/html
3131
USER ${UID}:${GID}

scripts/screen/backend.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
source ${CONDA_PREFIX:-/data/dima/.miniconda3}/etc/profile.d/conda.sh
44
conda activate annot8
55
python manage.py $@
6-

scripts/screen/rc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
setenv FRONTEND_PORT 8082
2+
setenv BACKEND_PORT 8001
13

24
chdir backend
3-
screen -t backend ../scripts/screen/backend.sh runserver 0.0.0.0:8000
5+
screen -t backend ../scripts/screen/backend.sh runserver 0.0.0.0:${BACKEND_PORT}
46
screen -t qcluster ../scripts/screen/backend.sh qcluster
57

68
chdir ../frontend
7-
screen -t frondend npm run serve
9+
screen -t frondend npm run serve -- --port ${FRONTEND_PORT}
810
screen -t redis redis-server
911

1012
chdir ..
1113

1214
# Statuszeile
1315
caption always "%{= wk} %-w%{= KW} [%n %t] %{-}%+w %= | @%H | %l | %Y-%m-%d %c "
14-

0 commit comments

Comments
 (0)