-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run entrypoint in DEV only on first creation
- Loading branch information
Showing
8 changed files
with
27 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/bin/sh | ||
|
||
[ -e ".finished" ] && return 0 | ||
|
||
apk update && apk add chromium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/bin/sh | ||
|
||
touch .finished | ||
|
||
while true; do sleep 600; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/bin/sh | ||
|
||
[ -e ".finished" ] && return 0 | ||
|
||
npm ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
#!/bin/sh | ||
|
||
apk update && apk add git | ||
|
||
git remote || INIT=true | ||
[ -e ".finished" ] && return 0 | ||
|
||
apk update && apk add git | ||
echo "${GITHUB_REPO}" | grep -q "#" && TAG="${GITHUB_REPO#*#}" || TAG= | ||
|
||
if [ "${INIT}" ] | ||
git init | ||
chown -R "$(find . -maxdepth 1 -exec ls -ld {} + | awk '{print $3":"$4}' | tail -n1)" .git | ||
git config --global --add safe.directory "${PWD}" | ||
REPO="${GITHUB_REPO%%#*}" | ||
git remote add origin "${REPO}" | ||
git fetch | ||
DEFAULT_BRANCH=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p') | ||
git reset --hard origin/"${DEFAULT_BRANCH}" | ||
git clean -fd | ||
if [ -n "${TAG}" ] | ||
then | ||
git init | ||
chown -R "$(find . -maxdepth 1 -exec ls -ld {} + | awk '{print $3":"$4}' | tail -n1)" .git | ||
git config --global --add safe.directory "${PWD}" | ||
REPO="${GITHUB_REPO%%#*}" | ||
git remote add origin "${REPO}" | ||
git fetch | ||
DEFAULT_BRANCH=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p') | ||
git reset --hard origin/"${DEFAULT_BRANCH}" | ||
git clean -fd | ||
if [ -n "${TAG}" ] | ||
then | ||
git checkout "${TAG}" | ||
fi | ||
git checkout "${TAG}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/bin/sh | ||
|
||
[ -e ".finished" ] && return 0 | ||
|
||
echo "MONGODB_URI=$MONGODB_URI" >.env | ||
npm run migrate:db:up | ||
rm .env |