Fix bundler not found problem

This commit is contained in:
Eugene Burmakin
2024-04-04 23:12:32 +02:00
parent 6232e5f329
commit b2a442a7d8
9 changed files with 42 additions and 10 deletions

2
.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
/log
/tmp

View File

@@ -34,7 +34,6 @@ RUN apk -U add --no-cache \
&& rm -rf /var/cache/apk/* \
&& mkdir -p $APP_PATH
RUN gem update --system
RUN gem install bundler --version "$BUNDLE_VERSION" \
&& rm -rf $GEM_HOME/cache/*

View File

@@ -160,8 +160,14 @@ GEM
nio4r (2.7.1)
nokogiri (1.16.3-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.3-arm-linux)
racc (~> 1.4)
nokogiri (1.16.3-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.3-x86-linux)
racc (~> 1.4)
nokogiri (1.16.3-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.3-x86_64-linux)
racc (~> 1.4)
optimist (3.1.0)
@@ -308,10 +314,16 @@ GEM
attr_extras (>= 6.2.4)
diff-lcs
patience_diff
tailwindcss-rails (2.3.0)
railties (>= 6.0.0)
tailwindcss-rails (2.3.0-aarch64-linux)
railties (>= 6.0.0)
tailwindcss-rails (2.3.0-arm-linux)
railties (>= 6.0.0)
tailwindcss-rails (2.3.0-arm64-darwin)
railties (>= 6.0.0)
tailwindcss-rails (2.3.0-x86_64-darwin)
railties (>= 6.0.0)
tailwindcss-rails (2.3.0-x86_64-linux)
railties (>= 6.0.0)
thor (1.3.1)
@@ -333,10 +345,10 @@ GEM
PLATFORMS
aarch64-linux
aarch64-linux-musl
arm64-darwin-21
arm64-darwin-22
arm64-darwin-23
arm-linux
arm64-darwin
x86-linux
x86_64-darwin
x86_64-linux
DEPENDENCIES

View File

@@ -1,4 +1,3 @@
web: bundle exec puma -C config/puma.rb
worker: bundle exec sidekiq -C config/sidekiq.yml
release: bundle exec rails db:migrate

View File

@@ -1,3 +1,2 @@
web: bin/rails server -p 3000 -b 0.0.0.0
css: bin/rails tailwindcss:watch
worker: bundle exec sidekiq -C config/sidekiq.yml

View File

@@ -4,7 +4,7 @@
"quantity": 1
},
"worker": {
"quantity": 1
"quantity": 0
}
}
}

View File

@@ -1,5 +1,8 @@
#!/bin/sh
unset BUNDLE_PATH
unset BUNDLE_BIN
set -e
echo "Environment: $RAILS_ENV"
@@ -13,6 +16,10 @@ until nc -zv $DATABASE_HOST 5432; do
sleep 1
done
# Install gems
gem update --system
gem install bundler --version '2.5.7'
# Create the database
echo "Creating database $DATABASE_NAME..."
bundle exec rails db:create

View File

@@ -0,0 +1,14 @@
#!/bin/sh
set -e
echo "Environment: $RAILS_ENV"
# Wait for the database to be ready
until nc -zv $DATABASE_HOST 5432; do
echo "Waiting for PostgreSQL to be ready..."
sleep 1
done
# run passed commands
bundle exec ${@}

View File

@@ -21,7 +21,7 @@ services:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
dawarich_app:
image: freikin/dawarich:0.1.4
image: freikin/dawarich:0.1.4.1
container_name: dawarich_app
volumes:
- gem_cache:/usr/local/bundle/gems
@@ -45,7 +45,7 @@ services:
- dawarich_db
- dawarich_redis
dawarich_sidekiq:
image: freikin/dawarich:0.1.4
image: freikin/dawarich:0.1.4.1
container_name: dawarich_sidekiq
volumes:
- gem_cache:/usr/local/bundle/gems