Initial commit

This commit is contained in:
Stanislav Kolotinskiy 2021-03-19 17:31:38 +02:00
commit 0cec39413f
116 changed files with 9683 additions and 0 deletions

1
docker/.env Normal file
View file

@ -0,0 +1 @@
RAILS_MAX_THREADS=3

34
docker/entrypoint.sh Executable file
View file

@ -0,0 +1,34 @@
#!/bin/bash
SEED_CONTROL_FILE=/app/tmp/seeds.setup
echo "Running bundle"
bundle --jobs `expr $(cat /proc/cpuinfo | grep -c 'cpu cores')` --retry 3
if [ -f "$SEED_CONTROL_FILE" ]; then
echo "DB already set up"
else
echo 'Setting up the DB'
# bundle exec rails db:drop db:create db:schema:load db:seed --trace
if [[ $? == 0 ]]; then
touch $SEED_CONTROL_FILE
else
echo
echo "Failed to run DB setup"
exit 1
fi
fi
echo "Running DB migrations"
# bundle exec rake db:migrate
if [[ $? != 0 ]]; then
echo
echo "== Failed to migrate."
exit 1
fi
# Execute the given or default command:
exec "$@"

3
docker/webpack_entrypoint.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
exec "$@"