Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add deployment preview to pull requests via Uffizzi integration #2364

Merged
merged 62 commits into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
ff96a50
Integrate Uffizzi
ShrutiC-git Dec 23, 2022
77d028b
integrate uffizzi
ShrutiC-git Jan 16, 2023
c431f4e
integrate uffizzi
ShrutiC-git Jan 16, 2023
dc39d34
integrate uffizzi
ShrutiC-git Jan 16, 2023
bc6b746
integrate uffizzi
ShrutiC-git Jan 16, 2023
b164445
integrate uffizzi
ShrutiC-git Jan 16, 2023
6a69564
integrate uffizzi
ShrutiC-git Jan 16, 2023
f3aa24b
integrate uffizzi
ShrutiC-git Jan 16, 2023
1ef8edf
integrate uffizzi
ShrutiC-git Jan 16, 2023
38b8625
integrate uffizzi
ShrutiC-git Jan 16, 2023
c566873
integrate uffizzi
ShrutiC-git Jan 16, 2023
ded89bf
integrate uffizzi
ShrutiC-git Jan 16, 2023
603fc2b
integrate uffizzi
ShrutiC-git Jan 16, 2023
c8fb17c
integrate uffizzi
ShrutiC-git Jan 16, 2023
761189b
integrate uffizzi
ShrutiC-git Jan 16, 2023
1f7de0a
integrate uffizzi
ShrutiC-git Jan 16, 2023
ab9ac48
integrate uffizzi
ShrutiC-git Jan 16, 2023
c9396c3
integrate uffizzi
ShrutiC-git Jan 16, 2023
4293f4d
integrate uffizzi
ShrutiC-git Jan 16, 2023
2d21d49
integrate uffizzi
ShrutiC-git Jan 16, 2023
d02aaef
integrate uffizzi
ShrutiC-git Jan 16, 2023
8265bd2
core port
ShrutiC-git Jan 16, 2023
5cf33b4
core port
ShrutiC-git Jan 16, 2023
282266f
core port
ShrutiC-git Jan 16, 2023
34352cb
integrate uffizzi
ShrutiC-git Jan 16, 2023
7bf6d6f
integrate uffizzi
ShrutiC-git Jan 17, 2023
8e06a4e
integrate uffizzi
ShrutiC-git Jan 17, 2023
c47834b
integrate uffizzi
ShrutiC-git Jan 17, 2023
d59f93a
integrate uffizzi
ShrutiC-git Jan 17, 2023
1356026
integrate uffizzi
ShrutiC-git Jan 17, 2023
119537b
integrate uffizzi
ShrutiC-git Jan 17, 2023
3a4d162
integrate uffizzi
ShrutiC-git Jan 17, 2023
cefa1df
integrate uffizzi
ShrutiC-git Jan 17, 2023
d798eea
integrate uffizzi
ShrutiC-git Jan 17, 2023
d5ef9e9
integrate uffizzi
ShrutiC-git Jan 17, 2023
10c65f4
integrate uffizzi
ShrutiC-git Jan 17, 2023
4bbfb70
integrate uffizzi
ShrutiC-git Jan 17, 2023
91e72bf
integrate uffizzi
ShrutiC-git Jan 17, 2023
23f87af
integrate uffizzi
ShrutiC-git Jan 17, 2023
d1770fe
integrate uffizzi
ShrutiC-git Jan 17, 2023
eb3a11a
integrate uffizzi
ShrutiC-git Jan 17, 2023
44d0654
integrate uffizzi
ShrutiC-git Jan 17, 2023
e559178
integrate uffizzi
ShrutiC-git Jan 17, 2023
063bc3a
integrate uffizzi
ShrutiC-git Jan 17, 2023
453b70b
integrate uffizzi
ShrutiC-git Jan 17, 2023
dcc877e
integrate uffizzi
ShrutiC-git Jan 17, 2023
c4cbeb1
integrate uffizzi
ShrutiC-git Jan 17, 2023
713c476
integrate uffizzi
ShrutiC-git Jan 17, 2023
04e8cc7
test pr
ShrutiC-git Jan 18, 2023
8dcc323
nginx expires
ShrutiC-git Jan 18, 2023
f3985d9
compose w CI config
ShrutiC-git Jan 18, 2023
5eb3ab8
compose w CI config
ShrutiC-git Jan 18, 2023
d79e4b8
compose w CI config
ShrutiC-git Jan 18, 2023
27c8946
compose w CI config
ShrutiC-git Jan 18, 2023
f44c78b
compose w CI config
ShrutiC-git Jan 18, 2023
a675a22
integrate
ShrutiC-git Jan 18, 2023
bd47f9e
uffizzi
ShrutiC-git Jan 19, 2023
7ba97de
uffizzi
ShrutiC-git Jan 19, 2023
6cf3201
Integrate Uffizzi
ShrutiC-git Dec 23, 2022
e974022
Update index.html
ShrutiC-git Jan 26, 2023
8b376e1
Merge branch 'ci' into uffizzi-ci-integration
ShrutiC-git Jan 26, 2023
baa9e1d
Merge branch 'alpha' into uffizzi-ci-integration
mtrezza Jan 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions docker-compose.uffizzi.yml
Original file line number Diff line number Diff line change
@@ -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:
19 changes: 19 additions & 0 deletions nginx-uffizzi/html/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>

<html>

<head>

<title>Parse Dashboard Preview</title>

</head>

<body>

<h1>Endpoint:</h1>

<a href="/dashboard/"><b>Click to Visit Parse Dashboard</b></a>

</body>

</html>
36 changes: 36 additions & 0 deletions nginx-uffizzi/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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;
}
}
}