Add empty shops.json in Dockerfile for cloud mode

The MyAesCrypt.export_to_file method expects config/shops.json to
exist as a cache of AES keys for tenant lookups. This file is in
.gitignore (runtime-generated) but needs to exist with at least an
empty JSON structure on first boot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Min Zeya Phyo
2026-02-07 23:57:20 +08:00
parent d0a607e976
commit 98ac443182

View File

@@ -23,8 +23,9 @@ RUN bundle install --deployment --without development test --jobs 4
# Copy application
COPY . .
# Create required directories
RUN mkdir -p tmp/pids tmp/puma tmp/cache tmp/sockets log storage public/uploads
# Create required directories and runtime files
RUN mkdir -p tmp/pids tmp/puma tmp/cache tmp/sockets log storage public/uploads \
&& echo '{"data":[]}' > config/shops.json
# Precompile assets
RUN RAILS_ENV=production SECRET_KEY_BASE=placeholder bundle exec rake assets:precompile 2>/dev/null || true