diff --git a/bin/docker-entrypoint b/bin/docker-entrypoint index ae40649..ac76d3a 100755 --- a/bin/docker-entrypoint +++ b/bin/docker-entrypoint @@ -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 "${@}" diff --git a/config/deploy.yml b/config/deploy.yml index 5323093..f48250c 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -32,6 +32,7 @@ env: WEB_CONCURRENCY: 1 secret: - RAILS_MASTER_KEY + # Aliases are triggered with "bin/kamal ". You can overwrite arguments on invocation: # "bin/kamal logs -r job" will tail logs from the first server in the job section. # @@ -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