diff --git a/Dockerfile b/Dockerfile index a6b685d577396519ad3b92df43c979b920f3db4f..d235bb59a8cad2e5adc4ce6f01ceaf981d9cdf7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,18 @@ FROM ruby:2.6 # throw errors if Gemfile has been modified since Gemfile.lock RUN bundle config --global frozen 1 +RUN gem install bundler WORKDIR /usr/src/app -#COPY Gemfile Gemfile.lock ./ COPY . . +RUN rm -rf storage && rm -rf lib/aethyr/extensions/reactions RUN bundle install +#RUN bundle update --bundler + +#cleanup +RUN rm -rf .git EXPOSE 8888 -CMD ["/usr/local/bin/bundle", "exec", "/usr/src/app/bin/aethyr", "run"] +CMD ["bundle", "exec", "./bin/aethyr", "run"] diff --git a/README.rdoc b/README.rdoc index 6a0d910dcf930946d76304026cd7135fe48787ec..11916d092ca212bf83a60bfd5bfa1983e3b37409 100644 --- a/README.rdoc +++ b/README.rdoc @@ -34,4 +34,5 @@ Just run the application with the following command. == Using Docker docker build -t syncleus/aethyr . - docker run -p 8888:8888 --rm syncleus/aethyr + docker run --rm -i -v "$PWD/storage:/usr/src/app/storage" -v "$PWD/conf:/usr/src/app/conf" -v "$PWD/lib/aethyr/extensions/reactions:/usr/src/app/lib/aethyr/extensions/reactions" -t syncleus/aethyr bundle exec ./bin/aethyr_setup + docker run -p 8888:8888 -v "$PWD/storage:/usr/src/app/storage" -v "$PWD/conf:/usr/src/app/conf" -v "$PWD/lib/aethyr/extensions/reactions:/usr/src/app/lib/aethyr/extensions/reactions" --rm syncleus/aethyr diff --git a/bin/aethyr_setup b/bin/aethyr_setup index 45871a74b30f80fe7169d89bfd3d9fd9898a7a4b..f01417041d3522211cf508565230f3cd5aaaa1ec 100755 --- a/bin/aethyr_setup +++ b/bin/aethyr_setup @@ -87,8 +87,8 @@ def reset_storage end puts "Erasing storage..." - FileUtils.rm_rf "storage/", :secure => true - FileUtils.mkdir "storage" + FileUtils.mkdir "storage" if not File.exist? "storage/" + FileUtils.rm_rf Dir.glob("storage/*"), :secure => true FileUtils.mkdir "storage/boards" FileUtils.mkdir "storage/admin" FileUtils.mkdir "logs" if not File.exist? "logs/" @@ -131,7 +131,7 @@ def reset_storage puts "Adding helper reactions..." - FileUtils.mkdir "lib/aethyr/extensions/reactions" if not File.exist? "lib/aethyr/objects/reactions/" + FileUtils.mkdir "lib/aethyr/extensions/reactions" if not File.exist? "lib/aethyr/extensions/reactions/" File.open "lib/aethyr/extensions/reactions/helper.rx", "w" do |f| f.write helper_reactions diff --git a/conf/config.yaml b/conf/config.yaml index 4db075a8ae8dbf91c1aa5aadedfd5b494069c9a4..7cce32b7cfbe6f63ceeb297d119365d415f07d0c 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -9,7 +9,7 @@ :restart_delay: 10 :address: 0.0.0.0 :intro_file: intro.txt -:start_room: 2197cd6f-523e-0922-6722-fe97b729677c +:start_room: 925f8042-915a-9582-2d07-059473ae02f7 :restart_limit: 15 :mccp: false :mssp: false