Skip to content

Commit

Permalink
Added frontend S2I scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
artur-barrionuevo committed Oct 1, 2024
1 parent 3554ba2 commit a688554
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ node_modules
results
yarn.lock
/public

!.s2i/bin/
28 changes: 28 additions & 0 deletions frontend/.s2i/bin/assemble
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

echo "Default S2I assemble script will begin"

# TODO: Analyze how to use the default assemble or remove the call below and do a manual script merge for a complete custom assemble
/usr/libexec/s2i/assemble
rc=$?

if [ $rc -eq 0 ]; then
echo "After successful default S2I assembling"
echo "Starting custom S2I assembling"

npm install -g pnpm

make install

# set permissions for any installed artifacts
fix-permissions ./

# manually set permission to instance-wrapper
chmod +x ./instance-wrapper

echo "End of custom S2I assembling"
else
echo "After failed S2I assembling"
fi

exit $rc
1 change: 1 addition & 0 deletions frontend/.s2i/environment
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NODE_CMD="make start"
2 changes: 2 additions & 0 deletions frontend/instance-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
make start

0 comments on commit a688554

Please sign in to comment.