diff --git a/backend/Dockerfile b/backend/Dockerfile index 4148a1dbfc..47338b52be 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -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; \ diff --git a/frontend/docker-nginx/conf.d/default.conf b/frontend/docker-nginx/conf.d/default.conf index 872c60eb49..e21a790c35 100644 --- a/frontend/docker-nginx/conf.d/default.conf +++ b/frontend/docker-nginx/conf.d/default.conf @@ -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