Restructure omni services and add Chatwoot research snapshot

This commit is contained in:
Ruslan Bakiev
2026-02-21 11:11:27 +07:00
parent edea7a0034
commit b73babbbf6
7732 changed files with 978203 additions and 32 deletions

View File

@@ -0,0 +1,10 @@
#!/usr/bin/env ruby
require 'uri'
# Let DATABASE_URL env take presedence over individual connection params.
if !ENV['DATABASE_URL'].nil? && ENV['DATABASE_URL'] != ''
uri = URI(ENV.fetch('DATABASE_URL', nil))
puts "export POSTGRES_HOST=#{uri.host} POSTGRES_PORT=#{uri.port} POSTGRES_USERNAME=#{uri.user}"
elsif ENV['POSTGRES_PORT'].nil? || ENV['POSTGRES_PORT'] == ''
puts 'export POSTGRES_PORT=5432'
end

View File

@@ -0,0 +1,34 @@
#!/bin/sh
set -x
# Remove a potentially pre-existing server.pid for Rails.
rm -rf /app/tmp/pids/server.pid
rm -rf /app/tmp/cache/*
echo "Waiting for postgres to become ready...."
# Let DATABASE_URL env take presedence over individual connection params.
# This is done to avoid printing the DATABASE_URL in the logs
$(docker/entrypoints/helpers/pg_database_url.rb)
PG_READY="pg_isready -h $POSTGRES_HOST -p $POSTGRES_PORT -U $POSTGRES_USERNAME"
until $PG_READY
do
sleep 2;
done
echo "Database ready to accept connections."
#install missing gems for local dev as we are using base image compiled for production
bundle install
BUNDLE="bundle check"
until $BUNDLE
do
sleep 2;
done
# Execute the main process of the container
exec "$@"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
set -x
rm -rf /app/tmp/pids/server.pid
rm -rf /app/tmp/cache/*
pnpm store prune
pnpm install --force
echo "Ready to run Vite development server."
exec "$@"