From 4b9195e8e59e0e066c9f0f82e66dd2db7a2d6a77 Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Sat, 16 Feb 2019 15:55:21 +0100 Subject: [PATCH] :green_heart: Fix docker-compose run --- docker-compose.yml | 7 +++++-- frontend/docker-nginx/conf.d/default.conf | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6150cae20..df0770a22 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,8 @@ services: - "POSTGRES_PASSWORD=uxbox_postgres_password" volumes: - db_data:/var/lib/postgresql/data + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro uxbackend: build: ./backend @@ -59,14 +61,15 @@ services: build: ./frontend #image: monogramm/uxbox:frontend container_name: uxfrontend - #hostname: uxbox.${DOMAIN} + #hostname: uxbox.io #restart: always depends_on: - uxbackend ports: - 80:80 environment: - #- "API_URL=http://uxbox.${DOMAIN}/api/" + - "API_URL=http://localhost:6060/api/" + #- "API_URL=http://uxbox.io/api/" volumes: #- /srv/uxbox/frontend/html:/usr/share/nginx/html - /etc/localtime:/etc/localtime:ro diff --git a/frontend/docker-nginx/conf.d/default.conf b/frontend/docker-nginx/conf.d/default.conf index 814109134..872c60eb4 100644 --- a/frontend/docker-nginx/conf.d/default.conf +++ b/frontend/docker-nginx/conf.d/default.conf @@ -25,7 +25,8 @@ server { # 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; + #proxy_pass http://backend; + proxy_pass http://uxbackend:6060; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -35,7 +36,7 @@ server { 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; + #proxy_cookie_domain localhost my.uxbox.com; } # Application