Skip to content

Commit

Permalink
minor changes to get migrations to run
Browse files Browse the repository at this point in the history
  • Loading branch information
Test committed Sep 13, 2024
1 parent 7befc38 commit 240a38f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
6 changes: 0 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,4 @@ EXPOSE 3000
RUN SECRET_KEY_BASE=dummy_key RAILS_ENV=production bundle exec rake assets:precompile


# Copy both entrypoint scripts and make them executable
COPY entrypoint.sh /usr/bin/
COPY sidekiq-entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
RUN chmod +x /usr/bin/sidekiq-entrypoint.sh

CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0", "-p", "3000"]
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.5-alpha
1.0.6-alpha
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
services:
web:
build: .
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails server -b 0.0.0.0 -p 3000"
entrypoint: ["./entrypoint.sh"]
volumes:
- .:/app
Expand Down
5 changes: 4 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#!/bin/bash
set -e

echo "Starting entrypoint.sh"
export REDIS_URL=redis://redis:6379/1

export SECRET_KEY_BASE=$(bin/rails secret)

rm -f /app/tmp/pids/server.pid

echo "Running bundle exec rake assets:precompile"
bundle exec rake assets:precompile

echo "Running bundle exec rails db:migrate"
bundle exec rails db:migrate

echo "Executing final command: $@"
exec "$@"

0 comments on commit 240a38f

Please sign in to comment.