Skip to content

Commit

Permalink
Fix entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
hschne committed Oct 15, 2024
1 parent 492c0ac commit aa71727
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/docker-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
rm -f /rails/tmp/pids/server.pid

# If running the rails server then create or migrate existing database
if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then
./bin/rails db:prepare
if [ "${@: -2:1}" == "./bin/rails" ] && [ "${@: -1:1}" == "server" ]; then
./bin/rails db:prepare
fi

exec "${@}"
5 changes: 3 additions & 2 deletions config/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ env:
WEB_CONCURRENCY: 1
secret:
- RAILS_MASTER_KEY

# Aliases are triggered with "bin/kamal <alias>". You can overwrite arguments on invocation:
# "bin/kamal logs -r job" will tail logs from the first server in the job section.
#
Expand All @@ -45,8 +46,8 @@ env:

# Use a persistent storage volume.
#
# volumes:
# - "app_storage:/app/storage"
volumes:
- "storage:/rails/storage"

# Bridge fingerprinted assets, like JS and CSS, between versions to avoid
# hitting 404 on in-flight requests. Combines all files from new and old
Expand Down

0 comments on commit aa71727

Please sign in to comment.