forked from e621ng/e621ng
[Docker] Clean up bin/setup
This commit is contained in:
parent
79fd71e1f6
commit
372cb8a1ac
6
.gitignore
vendored
6
.gitignore
vendored
@ -31,12 +31,6 @@ test/reports
|
||||
|
||||
.idea
|
||||
|
||||
/public/packs
|
||||
/public/packs-test
|
||||
/node_modules
|
||||
yarn-debug.log*
|
||||
.yarn-integrity
|
||||
|
||||
/public/packs
|
||||
/public/packs-test
|
||||
/node_modules
|
||||
|
@ -21,7 +21,7 @@ To mitigate this you can install a WSL distribution and clone the project inside
|
||||
1. Uncomment the `COMPOSE_PROFILES` variable if you wish to use solargraph. Doesn't work on Windows without WSL.
|
||||
1. Run the following commands:
|
||||
```
|
||||
docker-compose run -e DANBOORU_DISABLE_THROTTLES=true -e SEED_POST_COUNT=100 e621 /app/bin/setup
|
||||
docker-compose run -e SEED_POST_COUNT=100 e621 /app/bin/setup
|
||||
docker-compose up
|
||||
```
|
||||
After running the commands once only `docker-compose up` is needed to bring up the containers.
|
||||
|
11
bin/setup
11
bin/setup
@ -13,12 +13,6 @@ FileUtils.chdir APP_ROOT do
|
||||
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
|
||||
# Add necessary setup steps to this file.
|
||||
|
||||
puts '== Installing dependencies =='
|
||||
system('bundle check') || system!('bundle install -j$(nproc)')
|
||||
|
||||
# Install JavaScript dependencies
|
||||
system('bin/yarn')
|
||||
|
||||
puts "\n== Copying sample files =="
|
||||
unless File.exist?('config/database.yml')
|
||||
FileUtils.cp 'docker/database.yml', 'config/database.yml'
|
||||
@ -28,7 +22,7 @@ FileUtils.chdir APP_ROOT do
|
||||
end
|
||||
|
||||
puts "\n== Preparing database =="
|
||||
system! 'bin/rails db:prepare'
|
||||
system! 'DANBOORU_DISABLE_THROTTLES=true bin/rails db:prepare'
|
||||
|
||||
puts "\n== Preparing search indices =="
|
||||
system! 'bin/rails r Post.__elasticsearch__.create_index!'
|
||||
@ -38,7 +32,4 @@ FileUtils.chdir APP_ROOT do
|
||||
|
||||
puts "\n== Removing old logs and tempfiles =="
|
||||
system! 'bin/rails log:clear tmp:clear'
|
||||
|
||||
puts "\n== Restarting application server =="
|
||||
system! 'bin/rails restart'
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user