diff --git a/README.md b/README.md index c459bfdb4..e857e1cf5 100644 --- a/README.md +++ b/README.md @@ -42,9 +42,21 @@ $ docker run -d \ The following environment variables are also honored for configuring your UXBOX instance: #### Frontend -- `-e API_URL=...` (defaults to http://127.0.0.1:6060/api. **Only available at build time!** + +**Only available at build time!** +- `-e UXBOX_CONFIG_URL=...` (defaults to http://127.0.0.1:6060/api) +- `-e UXBOX_DEMO=...` (defaults to false) +- `-e UXBOX_DEBUG=...` (defaults to false) + +Available at runtime: +- `-e LANG=...` (defaults to en_US.UTF-8) +- `-e LC_ALL=...` (defaults to C.UTF-8) #### Backend + +Available at runtime: +- `-e LANG=...` (defaults to en_US.UTF-8) +- `-e LC_ALL=...` (defaults to C.UTF-8) - `-e UXBOX_HTTP_SERVER_DEBUG=...` (defaults to false) - `-e UXBOX_MEDIA_URI=...` (defaults to http://localhost:6060/media/) - `-e UXBOX_MEDIA_DIRECTORY=...` (defaults to resources/public/media) diff --git a/backend/Dockerfile b/backend/Dockerfile index 380c02290..8f675a121 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -20,7 +20,9 @@ LABEL maintainer="mathieu.brunot at monogramm dot io" COPY --from=0 /home/uxbox/backend/dist/uxbox-backend.jar /srv/uxbox/app.jar COPY --from=0 /home/uxbox/backend/docker-entrypoint.sh /entrypoint.sh -ENV UXBOX_HTTP_SERVER_DEBUG=false \ +ENV LANG=en_US.UTF-8 \ + LC_ALL=C.UTF-8 \ + UXBOX_HTTP_SERVER_DEBUG=false \ UXBOX_MEDIA_URI="http://localhost:6060/media/" \ UXBOX_MEDIA_DIRECTORY="resources/public/media" \ UXBOX_ASSETS_URI="http://localhost:6060/static/" \ diff --git a/docker/Dockerfile b/docker/Dockerfile index bbc49851f..e325709aa 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -38,11 +38,10 @@ RUN set -ex; \ cd .. && \ rm -rf ./imagemagick -ENV NODE_VERSION=8.15.0 - -ENV LANG en_US.UTF-8 -ENV LC_ALL C.UTF-8 -ENV API_URL https://demo.uxbox.io/api +ENV NODE_VERSION=8.15.0 \ + LANG=en_US.UTF-8 \ + LC_ALL=C.UTF-8 \ + UXBOX_CONFIG_URL="/api" RUN set -ex; \ echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" >> /etc/apt/sources.list; \ diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 29fdc3c73..90323c906 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,8 +1,9 @@ FROM monogramm/docker-uxbox-builder:latest ENV LEIN_ROOT=TRUE \ - API_URL=http://127.0.0.1:6060/api \ - IS_DEMO=false + UXBOX_CONFIG_URL="/api" \ + UXBOX_DEMO=false \ + UXBOX_DEBUG=false # Copy frontend source and build release COPY . /home/uxbox/frontend @@ -11,8 +12,11 @@ RUN set -ex; \ rm -f Dockerfile; \ rm -rf ./dist ./node_modules; \ sed -i \ - -e 's|"uxbox.config.url" ".*"|"uxbox.config.url" "${API_URL}/api"|g' \ + -e 's|"uxbox.config.url" ".*"|"uxbox.config.url" "${UXBOX_CONFIG_URL}"|g' \ scripts/figwheel.clj; \ + sed -i \ + -e 's|url ".*")|url "${UXBOX_CONFIG_URL}")|g' \ + src/uxbox/config.cljs; \ npm install; \ npm run prod; \ bash -c "/home/uxbox/frontend/scripts/dist-main"; \ @@ -26,6 +30,9 @@ FROM nginx:alpine LABEL maintainer="mathieu.brunot at monogramm dot io" +ENV LANG=en_US.UTF-8 \ + LC_ALL=C.UTF-8 + # Copy built app to www root COPY --from=0 /home/uxbox/frontend/dist /usr/share/nginx/html