mirror of
https://github.com/penpot/penpot.git
synced 2025-01-07 15:39:42 -05:00
🐳 Add backend and exporter uri env vars to frontend docker image
This commit is contained in:
parent
f733497f0f
commit
ad34ebff89
4 changed files with 22 additions and 13 deletions
|
@ -1,4 +1,5 @@
|
|||
# CHANGELOG
|
||||
|
||||
## 1.17.3
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
@ -9,6 +10,11 @@
|
|||
- Fix search field has implemented shared styles for "close icon" and "search icon" [Taiga #4927](https://tree.taiga.io/project/penpot/issue/4927)
|
||||
- Fix Handling correctly slashes "/" in emails [Taiga #4906](https://tree.taiga.io/project/penpot/issue/4906)
|
||||
- Fix Change text color from selected colors [Taiga #4933](https://tree.taiga.io/project/penpot/issue/4933)
|
||||
|
||||
### :sparkles: Enhancements
|
||||
|
||||
- Adds environment variables for specifying the export and backend URI for the frontend docker image, thanks to @Supernova3339 for the initial PR and suggestion [Github #2984](https://github.com/penpot/penpot/issues/2984)
|
||||
|
||||
## 1.17.2
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
|
|
@ -8,7 +8,7 @@ RUN set -ex; \
|
|||
|
||||
ADD ./bundle-frontend/ /var/www/app/
|
||||
ADD ./files/config.js /var/www/app/js/config.js
|
||||
ADD ./files/nginx.conf /etc/nginx/nginx.conf
|
||||
ADD ./files/nginx.conf /etc/nginx/nginx.conf.template
|
||||
ADD ./files/nginx-entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
log() {
|
||||
echo "[$(date +%Y-%m-%dT%H:%M:%S%:z)] $*"
|
||||
}
|
||||
|
||||
#########################################
|
||||
## App Frontend config
|
||||
#########################################
|
||||
|
@ -17,4 +13,15 @@ update_flags() {
|
|||
}
|
||||
|
||||
update_flags /var/www/app/js/config.js
|
||||
|
||||
|
||||
#########################################
|
||||
## Nginx Config
|
||||
#########################################
|
||||
|
||||
export PENPOT_BACKEND_URI=${PENPOT_BACKEND_URI:-http://penpot-backend:6060};
|
||||
export PENPOT_EXPORTER_URI=${PENPOT_EXPORTER_URI:-http://penpot-exporter};
|
||||
|
||||
envsubst "\$PENPOT_BACKEND_URI,\$PENPOT_EXPORTER_URI" < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
|
||||
|
||||
exec "$@";
|
||||
|
|
|
@ -82,7 +82,7 @@ http {
|
|||
}
|
||||
|
||||
location /assets {
|
||||
proxy_pass http://penpot-backend:6060/assets;
|
||||
proxy_pass $PENPOT_BACKEND_URI/assets;
|
||||
recursive_error_pages on;
|
||||
proxy_intercept_errors on;
|
||||
error_page 301 302 307 = @handle_redirect;
|
||||
|
@ -95,21 +95,17 @@ http {
|
|||
}
|
||||
|
||||
location /api/export {
|
||||
proxy_pass http://penpot-exporter:6061;
|
||||
proxy_pass $PENPOT_EXPORTER_URI;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://penpot-backend:6060/api;
|
||||
proxy_pass $PENPOT_BACKEND_URI/api;
|
||||
}
|
||||
|
||||
# location /admin {
|
||||
# proxy_pass http://penpot-admin:6065/admin;
|
||||
# }
|
||||
|
||||
location /ws/notifications {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_pass http://penpot-backend:6060/ws/notifications;
|
||||
proxy_pass $PENPOT_BACKEND_URI/ws/notifications;
|
||||
}
|
||||
|
||||
location / {
|
||||
|
|
Loading…
Reference in a new issue