Fix database issues and add APNS configuration
- Fix owner_id type to UUID in devices migration - Fix NOT NULL crash in device registration - Add APNS config and 1Password integration - Add --apns flag to bin/dev for local development - Clean up devices controller
This commit is contained in:
committed by
Rosa Gutierrez
parent
3c54cd84fc
commit
55336873b2
@@ -2,13 +2,31 @@
|
||||
|
||||
PORT=3006
|
||||
USE_TAILSCALE=0
|
||||
USE_APNS=0
|
||||
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
--tailscale) USE_TAILSCALE=1 ;;
|
||||
--apns) USE_APNS=1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$USE_APNS" = "1" ]; then
|
||||
if [ ! -f tmp/saas.txt ]; then
|
||||
echo "Enabling SaaS mode for APNs..."
|
||||
./bin/rails saas:enable
|
||||
fi
|
||||
echo "Loading APNs credentials from 1Password..."
|
||||
if ! eval "$(BUNDLE_GEMFILE=Gemfile.saas bundle exec apns-dev)"; then
|
||||
echo "Error: failed to load APNs credentials. Are you signed into 1Password?" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$APNS_ENCRYPTION_KEY" ] || [ -z "$APNS_KEY_ID" ]; then
|
||||
echo "Error: APNs credentials not set. Missing APNS_ENCRYPTION_KEY or APNS_KEY_ID." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f tmp/solid-queue.txt ]; then
|
||||
export SOLID_QUEUE_IN_PUMA=false
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user