The documented flow started web (with Solid Queue in Puma) before the databases existed, and required manually creating the 389ds back-end and seeding the LDAP directory and databases. Automate it: - add an ldap-init one-shot service that creates the 389ds back-end if it does not exist - add a web entrypoint that seeds LDAP and the databases on first start, and runs db:prepare on later boots - update README and AGENTS accordingly, including the reset steps
15 lines
272 B
Bash
15 lines
272 B
Bash
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
if [ ! -f tmp/.setup-complete ]; then
|
|
echo "First start: setting up LDAP entries and databases..."
|
|
bin/rails ldap:setup
|
|
bin/rails db:setup
|
|
touch tmp/.setup-complete
|
|
else
|
|
bin/rails db:prepare
|
|
fi
|
|
|
|
rm -f tmp/pids/server.pid
|
|
exec bin/dev
|