From 6cf32014b989b557cafc2564ff73e36816b2e067 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Fri, 23 Dec 2022 11:03:18 +0530 Subject: [PATCH 01/12] Integrate Uffizzi --- docker-compose.uffizzi.yml | 75 +++++++++++++++++++++++++++++++++++ nginx-uffizzi/html/index.html | 20 ++++++++++ nginx-uffizzi/nginx.conf | 35 ++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 docker-compose.uffizzi.yml create mode 100644 nginx-uffizzi/html/index.html create mode 100644 nginx-uffizzi/nginx.conf diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml new file mode 100644 index 0000000000..7d2805a5ce --- /dev/null +++ b/docker-compose.uffizzi.yml @@ -0,0 +1,75 @@ +version: '3' + +# uffizzi integration +x-uffizzi: + ingress: + service: nginx + port: 8081 + continuous_previews: + deploy_preview_when_pull_request_is_opened: true + delete_preview_when_pull_request_is_closed: true + share_to_github: true + +services: + + postgres: + image: postgres + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=password + - POSTGRES_DB=postgres + ports: + - "5432:5432" + deploy: + resources: + limits: + memory: 1000M + volumes: + - postgres_data:/var/lib/postgresql + + parse: + image: parseplatform/parse-server:latest + environment: + - PARSE_SERVER_APPLICATION_ID=parse + - PARSE_SERVER_MASTER_KEY=parse@master123! + - PARSE_SERVER_DATABASE_URI=postgresql://postgres:password@localhost:5432/postgres + - PARSE_SERVER_MOUNT_PATH=/parse + - PORT=1337 + ports: + - '1337:1337' + deploy: + resources: + limits: + memory: 1000M + + dashboard: + build: + context: . + dockerfile: ./Dockerfile + ports: + - "4040:4040" + environment: + - PARSE_DASHBOARD_MASTER_KEY=parse@master123! + - PARSE_DASHBOARD_APP_ID=parse + - PARSE_DASHBOARD_APP_NAME=MyParseApp + - PARSE_DASHBOARD_USER_ID=admin + - PARSE_DASHBOARD_USER_PASSWORD=password + - MOUNT_PATH=/dashboard + - PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1 + entrypoint: /bin/sh + command: + - "-c" + - "PARSE_DASHBOARD_SERVER_URL=$$UFFIZZI_URL/parse node Parse-Dashboard/index.js" + deploy: + resources: + limits: + memory: 1000M + + nginx: + image: nginx:alpine + volumes: + - ./nginx-uffizzi:/etc/nginx + - ./nginx-uffizzi/html:/usr/share/nginx/html + +volumes: + postgres_data: diff --git a/nginx-uffizzi/html/index.html b/nginx-uffizzi/html/index.html new file mode 100644 index 0000000000..1f624f6a33 --- /dev/null +++ b/nginx-uffizzi/html/index.html @@ -0,0 +1,20 @@ + + + + + + +Parse Dashboard Preview + + + + + +

Endpoint:

+ + Click to Visit Parse Dashboard + + + + + diff --git a/nginx-uffizzi/nginx.conf b/nginx-uffizzi/nginx.conf new file mode 100644 index 0000000000..6ceab7c4e8 --- /dev/null +++ b/nginx-uffizzi/nginx.conf @@ -0,0 +1,35 @@ +events { + worker_connections 1024; #default +} +http { + + server { + + listen 8081; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + location /dashboard { + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-NginX-Proxy true; + proxy_pass http://localhost:4040/dashboard/; + proxy_ssl_session_reuse off; + proxy_set_header Host $http_host; + proxy_redirect off; + } + + location /parse { + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + keepalive_requests 10; + keepalive_timeout 75s; + proxy_pass http://localhost:1337/parse/; + proxy_http_version 1.1; + } + } +} From 4985f193af69f74fa53b1c28db1190b4f4ad1189 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Tue, 21 Mar 2023 12:37:20 +0530 Subject: [PATCH 02/12] testing --- docker-compose.uffizzi.yml | 150 +++++++++++++++++----------------- nginx-uffizzi/html/index.html | 40 ++++----- nginx-uffizzi/nginx.conf | 70 ++++++++-------- 3 files changed, 130 insertions(+), 130 deletions(-) diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml index 7d2805a5ce..eea65e81d5 100644 --- a/docker-compose.uffizzi.yml +++ b/docker-compose.uffizzi.yml @@ -1,75 +1,75 @@ -version: '3' - -# uffizzi integration -x-uffizzi: - ingress: - service: nginx - port: 8081 - continuous_previews: - deploy_preview_when_pull_request_is_opened: true - delete_preview_when_pull_request_is_closed: true - share_to_github: true - -services: - - postgres: - image: postgres - environment: - - POSTGRES_USER=postgres - - POSTGRES_PASSWORD=password - - POSTGRES_DB=postgres - ports: - - "5432:5432" - deploy: - resources: - limits: - memory: 1000M - volumes: - - postgres_data:/var/lib/postgresql - - parse: - image: parseplatform/parse-server:latest - environment: - - PARSE_SERVER_APPLICATION_ID=parse - - PARSE_SERVER_MASTER_KEY=parse@master123! - - PARSE_SERVER_DATABASE_URI=postgresql://postgres:password@localhost:5432/postgres - - PARSE_SERVER_MOUNT_PATH=/parse - - PORT=1337 - ports: - - '1337:1337' - deploy: - resources: - limits: - memory: 1000M - - dashboard: - build: - context: . - dockerfile: ./Dockerfile - ports: - - "4040:4040" - environment: - - PARSE_DASHBOARD_MASTER_KEY=parse@master123! - - PARSE_DASHBOARD_APP_ID=parse - - PARSE_DASHBOARD_APP_NAME=MyParseApp - - PARSE_DASHBOARD_USER_ID=admin - - PARSE_DASHBOARD_USER_PASSWORD=password - - MOUNT_PATH=/dashboard - - PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1 - entrypoint: /bin/sh - command: - - "-c" - - "PARSE_DASHBOARD_SERVER_URL=$$UFFIZZI_URL/parse node Parse-Dashboard/index.js" - deploy: - resources: - limits: - memory: 1000M - - nginx: - image: nginx:alpine - volumes: - - ./nginx-uffizzi:/etc/nginx - - ./nginx-uffizzi/html:/usr/share/nginx/html - -volumes: - postgres_data: +version: '3' + +# uffizzi integration +x-uffizzi: + ingress: + service: nginx + port: 8081 + continuous_previews: + deploy_preview_when_pull_request_is_opened: true + delete_preview_when_pull_request_is_closed: true + share_to_github: true + +services: + + postgres: + image: postgres + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=password + - POSTGRES_DB=postgres + ports: + - "5432:5432" + deploy: + resources: + limits: + memory: 1000M + volumes: + - postgres_data:/var/lib/postgresql + + parse: + image: parseplatform/parse-server:latest + environment: + - PARSE_SERVER_APPLICATION_ID=parse + - PARSE_SERVER_MASTER_KEY=parse@master123! + - PARSE_SERVER_DATABASE_URI=postgresql://postgres:password@localhost:5432/postgres + - PARSE_SERVER_MOUNT_PATH=/parse + - PORT=1337 + ports: + - '1337:1337' + deploy: + resources: + limits: + memory: 1000M + + dashboard: + build: + context: . + dockerfile: ./Dockerfile + ports: + - "4040:4040" + environment: + - PARSE_DASHBOARD_MASTER_KEY=parse@master123! + - PARSE_DASHBOARD_APP_ID=parse + - PARSE_DASHBOARD_APP_NAME=MyParseApp + - PARSE_DASHBOARD_USER_ID=admin + - PARSE_DASHBOARD_USER_PASSWORD=password + - MOUNT_PATH=/dashboard + - PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1 + entrypoint: /bin/sh + command: + - "-c" + - "PARSE_DASHBOARD_SERVER_URL=$$UFFIZZI_URL/parse node Parse-Dashboard/index.js" + deploy: + resources: + limits: + memory: 1000M + + nginx: + image: nginx:alpine + volumes: + - ./nginx-uffizzi:/etc/nginx + - ./nginx-uffizzi/html:/usr/share/nginx/html + +volumes: + postgres_data: diff --git a/nginx-uffizzi/html/index.html b/nginx-uffizzi/html/index.html index 1f624f6a33..4c07a64d06 100644 --- a/nginx-uffizzi/html/index.html +++ b/nginx-uffizzi/html/index.html @@ -1,20 +1,20 @@ - - - - - - -Parse Dashboard Preview - - - - - -

Endpoint:

- - Click to Visit Parse Dashboard - - - - - + + + + + + +Parse Dashboard Preview + + + + + +

Endpoint:

+ + Click to Visit Parse Dashboard + + + + + diff --git a/nginx-uffizzi/nginx.conf b/nginx-uffizzi/nginx.conf index 6ceab7c4e8..986bfdc765 100644 --- a/nginx-uffizzi/nginx.conf +++ b/nginx-uffizzi/nginx.conf @@ -1,35 +1,35 @@ -events { - worker_connections 1024; #default -} -http { - - server { - - listen 8081; - - location / { - root /usr/share/nginx/html; - index index.html index.htm; - } - - location /dashboard { - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-NginX-Proxy true; - proxy_pass http://localhost:4040/dashboard/; - proxy_ssl_session_reuse off; - proxy_set_header Host $http_host; - proxy_redirect off; - } - - location /parse { - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - keepalive_requests 10; - keepalive_timeout 75s; - proxy_pass http://localhost:1337/parse/; - proxy_http_version 1.1; - } - } -} +events { + worker_connections 1024; #default +} +http { + + server { + + listen 8081; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + location /dashboard { + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-NginX-Proxy true; + proxy_pass http://localhost:4040/dashboard/; + proxy_ssl_session_reuse off; + proxy_set_header Host $http_host; + proxy_redirect off; + } + + location /parse { + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + keepalive_requests 10; + keepalive_timeout 75s; + proxy_pass http://localhost:1337/parse/; + proxy_http_version 1.1; + } + } +} From 94e601ea029cb6f2c11b54d9709f37b543d5e599 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Tue, 21 Mar 2023 13:01:18 +0530 Subject: [PATCH 03/12] testing --- docker-compose.uffizzi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml index eea65e81d5..c69df41274 100644 --- a/docker-compose.uffizzi.yml +++ b/docker-compose.uffizzi.yml @@ -68,7 +68,7 @@ services: nginx: image: nginx:alpine volumes: - - ./nginx-uffizzi:/etc/nginx + - ./nginx-uffizz:/etc/nginx - ./nginx-uffizzi/html:/usr/share/nginx/html volumes: From d728de15f33c34c84cdbf777fb2fe949d7555014 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Tue, 21 Mar 2023 13:13:29 +0530 Subject: [PATCH 04/12] testing --- docker-compose.uffizzi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml index c69df41274..eea65e81d5 100644 --- a/docker-compose.uffizzi.yml +++ b/docker-compose.uffizzi.yml @@ -68,7 +68,7 @@ services: nginx: image: nginx:alpine volumes: - - ./nginx-uffizz:/etc/nginx + - ./nginx-uffizzi:/etc/nginx - ./nginx-uffizzi/html:/usr/share/nginx/html volumes: From a6a16944f73d8d0d7345479042b8d96d98d268ca Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi Date: Tue, 21 Mar 2023 13:16:02 +0530 Subject: [PATCH 05/12] break --- docker-compose.uffizzi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml index eea65e81d5..39201120bc 100644 --- a/docker-compose.uffizzi.yml +++ b/docker-compose.uffizzi.yml @@ -45,7 +45,7 @@ services: dashboard: build: context: . - dockerfile: ./Dockerfile + dockerfile: ./ci/Dockerfile ports: - "4040:4040" environment: From 3c425d256dfc127e795c0350dee48b68224cecf9 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi <66940685+ShrutiC-git@users.noreply.github.com> Date: Tue, 21 Mar 2023 18:56:31 +0530 Subject: [PATCH 06/12] Update docker-compose.uffizzi.yml --- docker-compose.uffizzi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml index 39201120bc..6522c38342 100644 --- a/docker-compose.uffizzi.yml +++ b/docker-compose.uffizzi.yml @@ -68,7 +68,7 @@ services: nginx: image: nginx:alpine volumes: - - ./nginx-uffizzi:/etc/nginx + - ./nginx-uffizz:/etc/nginx - ./nginx-uffizzi/html:/usr/share/nginx/html volumes: From 3a48d87897fd19ec26a5e8f20bdba1bb4f5f01e1 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi <66940685+ShrutiC-git@users.noreply.github.com> Date: Tue, 21 Mar 2023 18:58:52 +0530 Subject: [PATCH 07/12] Update docker-compose.uffizzi.yml --- docker-compose.uffizzi.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml index 6522c38342..381a35b38c 100644 --- a/docker-compose.uffizzi.yml +++ b/docker-compose.uffizzi.yml @@ -1,14 +1,14 @@ version: '3' -# uffizzi integration -x-uffizzi: - ingress: - service: nginx - port: 8081 - continuous_previews: - deploy_preview_when_pull_request_is_opened: true - delete_preview_when_pull_request_is_closed: true - share_to_github: true +# # uffizzi integration +# x-uffizzi: +# ingress: +# service: nginx +# port: 8081 +# continuous_previews: +# deploy_preview_when_pull_request_is_opened: true +# delete_preview_when_pull_request_is_closed: true +# share_to_github: true services: @@ -68,7 +68,7 @@ services: nginx: image: nginx:alpine volumes: - - ./nginx-uffizz:/etc/nginx + - ./nginx-uffizzi:/etc/nginx - ./nginx-uffizzi/html:/usr/share/nginx/html volumes: From cd7e090003dbd56e35ab9524c07acbe052132a8c Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi <66940685+ShrutiC-git@users.noreply.github.com> Date: Tue, 21 Mar 2023 18:59:26 +0530 Subject: [PATCH 08/12] Update docker-compose.uffizzi.yml --- docker-compose.uffizzi.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml index 381a35b38c..39201120bc 100644 --- a/docker-compose.uffizzi.yml +++ b/docker-compose.uffizzi.yml @@ -1,14 +1,14 @@ version: '3' -# # uffizzi integration -# x-uffizzi: -# ingress: -# service: nginx -# port: 8081 -# continuous_previews: -# deploy_preview_when_pull_request_is_opened: true -# delete_preview_when_pull_request_is_closed: true -# share_to_github: true +# uffizzi integration +x-uffizzi: + ingress: + service: nginx + port: 8081 + continuous_previews: + deploy_preview_when_pull_request_is_opened: true + delete_preview_when_pull_request_is_closed: true + share_to_github: true services: From 9e7b36c05bf6c2321f1a34a09685c147f288a602 Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi <66940685+ShrutiC-git@users.noreply.github.com> Date: Tue, 21 Mar 2023 19:19:33 +0530 Subject: [PATCH 09/12] Update docker-compose.uffizzi.yml --- docker-compose.uffizzi.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml index 39201120bc..381a35b38c 100644 --- a/docker-compose.uffizzi.yml +++ b/docker-compose.uffizzi.yml @@ -1,14 +1,14 @@ version: '3' -# uffizzi integration -x-uffizzi: - ingress: - service: nginx - port: 8081 - continuous_previews: - deploy_preview_when_pull_request_is_opened: true - delete_preview_when_pull_request_is_closed: true - share_to_github: true +# # uffizzi integration +# x-uffizzi: +# ingress: +# service: nginx +# port: 8081 +# continuous_previews: +# deploy_preview_when_pull_request_is_opened: true +# delete_preview_when_pull_request_is_closed: true +# share_to_github: true services: From 75d064e89e7abebe203d9c2229742b309a16d4bf Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi <66940685+ShrutiC-git@users.noreply.github.com> Date: Tue, 21 Mar 2023 19:23:43 +0530 Subject: [PATCH 10/12] Update docker-compose.uffizzi.yml --- docker-compose.uffizzi.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml index 381a35b38c..29ec684a81 100644 --- a/docker-compose.uffizzi.yml +++ b/docker-compose.uffizzi.yml @@ -1,14 +1,14 @@ version: '3' -# # uffizzi integration -# x-uffizzi: -# ingress: -# service: nginx -# port: 8081 -# continuous_previews: -# deploy_preview_when_pull_request_is_opened: true -# delete_preview_when_pull_request_is_closed: true -# share_to_github: true +# uffizzi integration +x-uffizzi: + ingress: + service: nginx + port: 8081 + continuous_previews: + deploy_preview_when_pull_request_is_opened: true + delete_preview_when_pull_request_is_closed: true + share_to_github: true services: @@ -68,7 +68,7 @@ services: nginx: image: nginx:alpine volumes: - - ./nginx-uffizzi:/etc/nginx + - ./nginx-uffizzi/nginx.conf:/etc/nginx/nginx.conf - ./nginx-uffizzi/html:/usr/share/nginx/html volumes: From 74eaa5a2af656534a8566e70ac3717dbe89f645a Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi <66940685+ShrutiC-git@users.noreply.github.com> Date: Tue, 21 Mar 2023 20:37:32 +0530 Subject: [PATCH 11/12] Update docker-compose.uffizzi.yml --- docker-compose.uffizzi.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml index 29ec684a81..906ebf7a99 100644 --- a/docker-compose.uffizzi.yml +++ b/docker-compose.uffizzi.yml @@ -1,14 +1,14 @@ version: '3' -# uffizzi integration -x-uffizzi: - ingress: - service: nginx - port: 8081 - continuous_previews: - deploy_preview_when_pull_request_is_opened: true - delete_preview_when_pull_request_is_closed: true - share_to_github: true +# # uffizzi integration +# x-uffizzi: +# ingress: +# service: nginx +# port: 8081 +# continuous_previews: +# deploy_preview_when_pull_request_is_opened: true +# delete_preview_when_pull_request_is_closed: true +# share_to_github: true services: From 091a2b1de6010cea63a0342d5a7ea2ad6e2ce09c Mon Sep 17 00:00:00 2001 From: Shruti Chaturvedi <66940685+ShrutiC-git@users.noreply.github.com> Date: Tue, 21 Mar 2023 20:39:21 +0530 Subject: [PATCH 12/12] Update docker-compose.uffizzi.yml --- docker-compose.uffizzi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml index 906ebf7a99..381a35b38c 100644 --- a/docker-compose.uffizzi.yml +++ b/docker-compose.uffizzi.yml @@ -68,7 +68,7 @@ services: nginx: image: nginx:alpine volumes: - - ./nginx-uffizzi/nginx.conf:/etc/nginx/nginx.conf + - ./nginx-uffizzi:/etc/nginx - ./nginx-uffizzi/html:/usr/share/nginx/html volumes: