0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 16:00:19 -05:00

🐳 🐛 Provide env variables for media and static download

This commit is contained in:
mathieu.brunot 2019-02-19 21:44:22 +01:00
parent 6394905022
commit f8ef533f6a
No known key found for this signature in database
GPG key ID: 81584BEAF692D7E0
4 changed files with 17 additions and 1 deletions

View file

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

View file

@ -21,6 +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
ENV UXBOX_HTTP_SERVER_DEBUG=false \
UXBOX_MEDIA_BASEURI="http://localhost:6060/media/" \
UXBOX_STATIC_BASEURI="http://localhost:6060/static/" \
UXBOX_DATABASE_USERNAME="uxbox" \
UXBOX_DATABASE_PASSWORD="youshouldoverwritethiswithsomethingelse" \
UXBOX_DATABASE_NAME="uxbox" \

View file

@ -33,6 +33,8 @@ services:
environment:
# HTTP setup
- UXBOX_HTTP_SERVER_DEBUG=false
- UXBOX_MEDIA_BASEURI=http://localhost:6060/media/
- UXBOX_STATIC_BASEURI=http://localhost:6060/static/
# Database setup
- UXBOX_DATABASE_USERNAME="uxbox"
- UXBOX_DATABASE_PASSWORD="uxbox_postgres_password"
@ -72,5 +74,6 @@ services:
#- "API_URL=http://uxbox.io/api/"
volumes:
#- /srv/uxbox/frontend/html:/usr/share/nginx/html
- /srv/uxbox/backend/resources:/srv/uxbox/resources:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro

View file

@ -41,6 +41,14 @@ server {
alias /usr/share/nginx/html/view;
}
location /media {
alias /srv/uxbox/resources/media;
}
location /static {
alias /srv/uxbox/resources/static;
}
# Backend
location /api/ {
# Reverse Proxy to Backend (Avoids XSS concerns) --Update backend to be whatever your site uses to access your backend
@ -56,4 +64,5 @@ server {
# IMPORTANT: Update uxbox.{{ DOMAIN }} to your production site. This will allow cookies to work as expected when using your deployment locally
#proxy_cookie_domain localhost uxbox.{{ DOMAIN }};
}
}
}