Skip to content

Commit 5572f74

Browse files
Add build process and deploy config for merged front
1 parent f6a76bd commit 5572f74

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

.buildpacks

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
https://github.com/Scalingo/nodejs-buildpack
2+
https://github.com/Scalingo/nginx-buildpack

nginx.conf.erb

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# exactly match the / URI
2+
location = / {
3+
root /app/dist/;
4+
}
5+
6+
# all the other URIs
7+
location / {
8+
root /app/dist/;
9+
# try_files try to load the file of the URI, and if it fails, it serve the / URI
10+
# => in our case, if the uri is not found, it means that's an Ember URL and just return the index
11+
# => BECAUSE / is not a file, this would make a infinite redirection loop. So we need the first block without try_files
12+
try_files $uri /;
13+
}

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
"url": "git+https://github.com/1024pix/pix.git"
3434
},
3535
"scripts": {
36+
"build": "run-p build:mon-pix build:orga build:certif",
37+
"build:mon-pix": "(cd mon-pix && npm run build) && mkdir -p dist && cp -R mon-pix/dist dist/app",
38+
"build:orga": "(cd orga && npm run build) && mkdir -p dist && cp -R orga/dist dist/orga",
39+
"build:certif": "(cd certif && npm run build) && mkdir -p dist && cp -R certif/dist dist/certif",
3640
"ci:signal-jira": "node ./scripts/jira/comment-with-review-app-url.js",
3741
"clean": "node_modules/.bin/run-p clean:api clean:mon-pix clean:orga clean:certif clean:coverage && npm run clean:root",
3842
"clean:api": "cd api && npm run clean",

0 commit comments

Comments
 (0)