-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from phillmv/fix_static_mode
Fix static mode tests
- Loading branch information
Showing
25 changed files
with
237 additions
and
48 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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
PROJECT_FOLDER=`realpath $(dirname "$0")/..` && cd "$PROJECT_FOLDER" | ||
|
||
PID=$(cat tmp/pids/server.pid 2>/dev/null) && ps -p $PID > /dev/null && kill $PID | ||
./bin/rails s -e production -d && ./bin/rails static:generate |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
PROJECT_FOLDER=`realpath $(dirname "$0")/..` && cd "$PROJECT_FOLDER" | ||
./bin/rails static:import |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
PROJECT_FOLDER=`realpath $(dirname "$0")/..` && cd "$PROJECT_FOLDER" | ||
./bin/mawl-import && ./bin/mawl-generate |
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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
PROJECT_FOLDER=`realpath $(dirname "$0")/..` | ||
|
||
if [ -z ${DATA_FOLDER+x} ]; then | ||
DATA_FOLDER="$PROJECT_FOLDER"/data | ||
fi | ||
|
||
mkdir -p "$DATA_FOLDER" | ||
|
||
if [ -z ${ARQUIVO_PORT+x} ]; then | ||
ARQUIVO_PORT=12346 | ||
fi | ||
|
||
if [ "$#" -eq 0 ]; then | ||
echo "Usage: $0 [console|server]" | ||
exit 1 | ||
else | ||
if [ "$1" = "console" ]; then | ||
shift | ||
if [ "$#" -eq 0 ]; then | ||
DOCKER_COMMAND="bash" | ||
else | ||
DOCKER_COMMAND="$@" | ||
fi | ||
elif [ "$1" = "server" ]; then | ||
shift | ||
# do the default | ||
DOCKER_COMMAND= | ||
export RAILS_ENV=development | ||
elif [ "$1" = "mawl" ]; then | ||
# TODO: rationalize into its own command, plus a server option | ||
shift | ||
|
||
if [ -z "${1+x}" ]; then | ||
echo "Usage: $0 mawl [input-folder] [output-folder]" | ||
exit 1 | ||
else | ||
MAWL_INPUT_PATH=`realpath "$1"` | ||
fi | ||
|
||
if [ -z "${2+x}" ]; then | ||
MAWL_OUTPUT_PATH="$PROJECT_FOLDER"/tmp/mawl-output | ||
else | ||
MAWL_OUTPUT_PATH="$2" | ||
fi | ||
|
||
export STATIC_PLS=1 | ||
DOCKER_COMMAND=/arquivo/bin/mawl-import-and-generate | ||
# DOCKER_COMMAND="./bin/rails server -d && ./bin/rails static:import static:generate" | ||
fi | ||
fi | ||
|
||
export ARQUIVO_USER=phillmv | ||
export [email protected] | ||
export ARQUIVO_GIT_NAME="Phill MV" | ||
export RAILS_MASTER_KEY=$(cat "$PROJECT_FOLDER"/config/master.key) | ||
export RAILS_BIND=tcp://0.0.0.0:3001 | ||
|
||
echo "Running arquivo while mounting local filesystem..." | ||
|
||
docker run -it -p "$ARQUIVO_PORT":3001 \ | ||
-e ARQUIVO_USER \ | ||
-e ARQUIVO_GIT_EMAIL \ | ||
-e ARQUIVO_GIT_NAME \ | ||
-e RAILS_ENV \ | ||
-e RAILS_BIND \ | ||
-e STATIC_PLS \ | ||
-v "$MAWL_INPUT_PATH":/mawl-input \ | ||
-v "$DATA_FOLDER":/data \ | ||
-v "$MAWL_OUTPUT_PATH":/output \ | ||
-v "$PROJECT_FOLDER":/arquivo \ | ||
arquivo-development:latest ${DOCKER_COMMAND} |
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
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
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
Oops, something went wrong.