-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
38 lines (28 loc) · 957 Bytes
/
entrypoint.sh
File metadata and controls
38 lines (28 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
#copy customization to frontend
cp -rf /customization/* /frontend/src/
#put backend into serve
cp -r /backend/ /serve/
#build frontend with custom files
cd /frontend
#frontend args
echo "VITE_SEARCH_BASE_URL=$VITE_SEARCH_BASE_URL" >> .env.production
echo "VITE_SEARCH_QUERY_PATH=$VITE_SEARCH_QUERY_PATH" >> .env.production
echo "VITE_TITLE_TEXT=$VITE_TITLE_TEXT" >> .env.production
echo "VITE_HEADER_TEXT=$VITE_HEADER_TEXT" >> .env.production
npm i --include=dev #we need the dev dependencies to compile our customizations on run
npm run build
#install backend deps
cd /serve/backend
#backend args
echo "BASE_DOMAIN=$BASE_DOMAIN" >> .env.production
echo "NGINXPM_URL=$NGINXPM_URL" >> .env.production
echo "NGINXPM_USER=$NGINXPM_USER" >> .env.production
echo "NGINXPM_PASS=$NGINXPM_PASS" >> .env.production
npm i
#put frontend build into backend public folder
rm -rf public/
cp -r /frontend/dist ./
mv dist/ public/
#run app
npm run start