0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 06:58:58 -05:00

🐳 🐛 Fix media and assets URI environment variables

This commit is contained in:
mathieu.brunot 2019-02-19 22:31:59 +01:00
parent 6498c0fe44
commit 1de7f24047
No known key found for this signature in database
GPG key ID: 81584BEAF692D7E0
5 changed files with 25 additions and 17 deletions

View file

@ -46,8 +46,8 @@ The following environment variables are also honored for configuring your UXBOX
#### Backend #### Backend
- `-e UXBOX_HTTP_SERVER_DEBUG=...` (defaults to false) - `-e UXBOX_HTTP_SERVER_DEBUG=...` (defaults to false)
- `-e UXBOX_MEDIA_BASEURI=...` (defaults to http://localhost:6060/media/) - `-e UXBOX_MEDIA_URI=...` (defaults to http://localhost:6060/media/)
- `-e UXBOX_STATIC_BASEURI=...` (defaults to http://localhost:6060/static/) - `-e UXBOX_ASSETS_URI=...` (defaults to http://localhost:6060/static/)
- `-e UXBOX_DATABASE_USERNAME="..."` (defaults to uxbox) - `-e UXBOX_DATABASE_USERNAME="..."` (defaults to uxbox)
- `-e UXBOX_DATABASE_PASSWORD="..."` (defaults to youshouldoverwritethiswithsomethingelse) - `-e UXBOX_DATABASE_PASSWORD="..."` (defaults to youshouldoverwritethiswithsomethingelse)
- `-e UXBOX_DATABASE_NAME="..."` (defaults to uxbox) - `-e UXBOX_DATABASE_NAME="..."` (defaults to uxbox)

View file

@ -21,8 +21,8 @@ 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 COPY --from=0 /home/uxbox/backend/docker-entrypoint.sh /entrypoint.sh
ENV UXBOX_HTTP_SERVER_DEBUG=false \ ENV UXBOX_HTTP_SERVER_DEBUG=false \
UXBOX_MEDIA_BASEURI="http://localhost:6060/media/" \ UXBOX_MEDIA_URI="http://localhost:6060/media/" \
UXBOX_STATIC_BASEURI="http://localhost:6060/static/" \ UXBOX_ASSETS_URI="http://localhost:6060/static/" \
UXBOX_DATABASE_USERNAME="uxbox" \ UXBOX_DATABASE_USERNAME="uxbox" \
UXBOX_DATABASE_PASSWORD="youshouldoverwritethiswithsomethingelse" \ UXBOX_DATABASE_PASSWORD="youshouldoverwritethiswithsomethingelse" \
UXBOX_DATABASE_NAME="uxbox" \ UXBOX_DATABASE_NAME="uxbox" \

View file

@ -2,6 +2,11 @@
;; WARNING: this is a default secret key and ;; WARNING: this is a default secret key and
;; it should be overwritten in production env. ;; it should be overwritten in production env.
:secret "5qjiAn-QUpawUNqGP10UZKklSqbLKcdGY3sJpq0UUACpVXGg2HOFJCBejDWVHskhRyp7iHb4rjOLXX2ZjF-5cw" :secret "5qjiAn-QUpawUNqGP10UZKklSqbLKcdGY3sJpq0UUACpVXGg2HOFJCBejDWVHskhRyp7iHb4rjOLXX2ZjF-5cw"
:registration
{
:enabled true}
:smtp :smtp
{:host "localhost" ;; Hostname of the desired SMTP server. {:host "localhost" ;; Hostname of the desired SMTP server.
:port 25 ;; Port of SMTP server. :port 25 ;; Port of SMTP server.
@ -15,19 +20,20 @@
:auth-options {:alg :a256kw :enc :a128cbc-hs256} :auth-options {:alg :a256kw :enc :a128cbc-hs256}
:email {:reply-to "no-reply@uxbox.io" :email {:reply-to "no-reply@uxbox.io"
:from "no-reply@uxbox.io"} :from "no-reply@uxbox.io"
:support "support@uxbox.io"}
:http {:port 6060 :http {:port 6060
:max-body-size 52428800 :max-body-size 52428800
:debug true} :debug true}
:media :media
{:basedir "resources/public/media" {:directory "resources/public/media"
:baseuri "http://localhost:6060/media/"} :uri "http://localhost:6060/media/"}
:static :static
{:basedir "resources/public/static" {:directory "resources/public/static"
:baseuri "http://localhost:6060/static/"} :uri "http://localhost:6060/static/"}
:database :database
{:adapter "postgresql" {:adapter "postgresql"

View file

@ -2,12 +2,12 @@
{:verbose false} {:verbose false}
:media :media
{:basedir "/tmp/uxbox/media" {:directory "/tmp/uxbox/media"
:baseuri "http://localhost:6060/media/"} :uri "http://localhost:6060/media/"}
:static :static
{:basedir "/tmp/uxbox/static" {:directory "/tmp/uxbox/static"
:baseuri "http://localhost:6060/static/"} :uri "http://localhost:6060/static/"}
:database :database
{:adapter "postgresql" {:adapter "postgresql"

View file

@ -33,8 +33,10 @@ services:
environment: environment:
# HTTP setup # HTTP setup
- UXBOX_HTTP_SERVER_DEBUG=false - UXBOX_HTTP_SERVER_DEBUG=false
- UXBOX_MEDIA_BASEURI=http://localhost:6060/media/ - UXBOX_MEDIA_URI="/media/"
- UXBOX_STATIC_BASEURI=http://localhost:6060/static/ #- UXBOX_MEDIA_URI="http://uxbox.io/media/"
- UXBOX_ASSETS_URI="/static/"
#- UXBOX_ASSETS_URI="http://uxbox.io/static/"
# Database setup # Database setup
- UXBOX_DATABASE_USERNAME="uxbox" - UXBOX_DATABASE_USERNAME="uxbox"
- UXBOX_DATABASE_PASSWORD="uxbox_postgres_password" - UXBOX_DATABASE_PASSWORD="uxbox_postgres_password"
@ -70,8 +72,8 @@ services:
ports: ports:
- 80:80 - 80:80
environment: environment:
- "API_URL=http://localhost:6060/api/" - API_URL="http://localhost:6060/api/"
#- "API_URL=http://uxbox.io/api/" #- API_URL="http://uxbox.io/api/"
volumes: volumes:
#- /srv/uxbox/frontend/html:/usr/share/nginx/html #- /srv/uxbox/frontend/html:/usr/share/nginx/html
- /srv/uxbox/backend/resources:/srv/uxbox/resources:ro - /srv/uxbox/backend/resources:/srv/uxbox/resources:ro