0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-12 18:18:24 -05:00

💚 Fix backend entrypoint

This commit is contained in:
mathieu.brunot 2019-02-16 16:50:39 +01:00
parent 4b9195e8e5
commit c8d645f920
No known key found for this signature in database
GPG key ID: 81584BEAF692D7E0
2 changed files with 9 additions and 8 deletions

View file

@ -6,7 +6,7 @@ ENV LEIN_ROOT=TRUE
COPY . /home/uxbox/backend
RUN set -ex; \
cd backend; \
rm -f Dockerfile docker-entrypoint.sh; \
rm -f Dockerfile; \
bash -c "/home/uxbox/backend/scripts/dist.sh"
@ -18,6 +18,7 @@ LABEL maintainer="mathieu.brunot at monogramm dot io"
# Add uxbox as provided by builder
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_DATABASE_USERNAME=uxbox \
@ -36,8 +37,6 @@ ENV UXBOX_HTTP_SERVER_DEBUG=false \
UXBOX_SMTP_ENABLED=false \
UXBOX_SECRET=youshouldoverwritethiswithsomethingelse
COPY docker-entrypoint.sh /entrypoint.sh
RUN set -ex; \
chmod 755 /entrypoint.sh; \
mkdir -p /srv/uxbox/resources/public/media; \

View file

@ -1,8 +1,8 @@
# This will load balance your backend to one or more destinations.
upstream backend {
# server api1.my.uxbox.com:3000;
# server api1.my.uxbox.com:3001;
# server api2.my.uxbox.com:3000;
# server api1.uxbox.{{ DOMAIN }}:3000;
# server api1.uxbox.{{ DOMAIN }}:3001;
# server api2.uxbox.{{ DOMAIN }}:3000;
server uxbackend:6060; # This is a circular reference that allows docker to start as the example project, it is not recommended to use this in actual development.
}
@ -23,6 +23,8 @@ server {
#ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
#ssl_prefer_server_ciphers on;
#server_name uxbox.{{ DOMAIN }};
# Reverse Proxy to Backend (Avoids XSS concerns) --Update api to be whatever your site uses to access your backend
location /api/ {
#proxy_pass http://backend;
@ -35,8 +37,8 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# IMPORTANT: Update my.uxbox.com to your production site. This will allow cookies to work as expected when using your deployment locally
#proxy_cookie_domain localhost my.uxbox.com;
# 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 }};
}
# Application