File tree Expand file tree Collapse file tree 7 files changed +20
-87
lines changed
Expand file tree Collapse file tree 7 files changed +20
-87
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,14 @@ TESTING=True
1616
1717URL_API = http://localhost:8000/api/
1818
19+
1920# REACT
20- # React env variables are fixed when building the app.
21+ # React env variables are fixed when building the app - but overwritten when setting up the docker container.
22+ # See docker/entrypoint.sh
2123# React env variables need to be prefixed with "REACT_APP", otherwise the variables are ignored for
2224# security reasons.
23- REACT_APP_URL_SITE_BACKEND = http://localhost:8000/
24- REACT_APP_URL_API = http://localhost:8000/api/
25- REACT_APP_URL_ELASTICSEARCH = http://localhost:8000/es/
26- REACT_APP_ELASTICSEARCH_VERSION_MAYOR = 6
27- REACT_APP_URL_MINIO = http://localhost:8000/data/
28- FLASK_APP = autoapp.py
29- FLASK_ENV = development
30- DATABASE_URI = sqlite:///openml.db
25+ REACT_APP_URL_SITE_BACKEND = <REACT_APP_URL_SITE_BACKEND>
26+ REACT_APP_URL_API = <REACT_APP_URL_API>
27+ REACT_APP_URL_ELASTICSEARCH = <REACT_APP_URL_ELASTICSEARCH>
28+ REACT_APP_ELASTICSEARCH_VERSION_MAYOR = <REACT_APP_ELASTICSEARCH_VERSION_MAYOR>
29+ REACT_APP_URL_MINIO = <REACT_APP_URL_MINIO>
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3939 with :
4040 images : " openml/frontend"
4141 tags : |
42- type=semver,pattern={{raw}},prefix=dev_
42+ type=semver,pattern={{raw}}
4343
4444 - name : Build and push
4545 id : docker_build
Original file line number Diff line number Diff line change @@ -3,8 +3,7 @@ ARG environment=.dev
33COPY ./ /app
44
55RUN npm install --prefix /app/server/src/client/app
6- RUN /app/server/src/client/app/node_modules/.bin/env-cmd -f /app/.env${environment} npm run build --prefix /app/server/src/client/app
7-
6+ RUN /app/server/src/client/app/node_modules/.bin/env-cmd -f /app/.env npm run build --prefix /app/server/src/client/app
87
98
109FROM python:3.11-slim-bookworm
@@ -17,7 +16,6 @@ WORKDIR /app
1716RUN python -m pip install -r requirements.txt
1817
1918RUN useradd --create-home unprivileged-user
20- USER unprivileged-user
2119
2220COPY --from=build /app/server/src/client/app/build /app/server/src/client/app/build
2321
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ for FILENAME in /app/server/src/client/app/build/static/js/* .js; do
4+ # We expect some paths/urls to contain '/' characters, so we use '*' instead
5+ sed " s*<REACT_APP_URL_SITE_BACKEND>*${REACT_APP_URL_SITE_BACKEND:- http:// localhost: 8000/ } *g" --in-place ${FILENAME}
6+ sed " s*<REACT_APP_URL_API>*${REACT_APP_URL_API:- http:// localhost: 8000/ api/ } *g" --in-place ${FILENAME}
7+ sed " s*<REACT_APP_URL_ELASTICSEARCH>*${REACT_APP_URL_ELASTICSEARCH:- http:// localhost: 8000/ es/ } *g" --in-place ${FILENAME}
8+ sed " s*<REACT_APP_ELASTICSEARCH_VERSION_MAYOR>*${REACT_APP_ELASTICSEARCH_VERSION_MAYOR:- 6} *g" --in-place ${FILENAME}
9+ sed " s*<REACT_APP_URL_MINIO>*${REACT_APP_URL_MINIO:- http:// localhost: 8000/ data/ } *g" --in-place ${FILENAME}
10+ done
11+
12+ sudo su unprivileged-user
313gunicorn -b 0.0.0.0:5000 autoapp:app --chdir /app
You can’t perform that action at this time.
0 commit comments