mprocs.container.yml
Rama main · réplica de lectura del repositorio original.
procs:
rescript:
cmd: ["bash", "-c", "rm -f lib/bs/.compiler.log && make clean && make rescript-build && make rescript-watch"]
server:
cmd: ["bash", "-c", "echo 'Waiting for ReScript compiler...' && while [ ! -f lib/bs/.compiler.log ] || ! tail -1 lib/bs/.compiler.log 2>/dev/null | grep -q '^#Done'; do sleep 1; done && echo 'ReScript ready. Waiting for Stripe webhook secret...' && make wait-stripe-webhook-secret && echo 'Stripe webhook secret ready. Waiting for Postgres...' && while ! pg_isready -h localhost -U postgres 2>/dev/null; do sleep 2; done && echo 'Postgres ready, starting server...' && export PHX_HOST=${WORKTREE_HASH}.api.frontman.local && export PHX_URL_PORT=443 && cd apps/frontman_server && make dev-container"]
env:
FRONTMAN_INTERNAL_DEV: "true"
stripe-webhooks:
cmd: ["make", "stripe-webhooks"]
client:
cmd: ["bash", "-c", "echo 'Waiting for ReScript compiler...' && while [ ! -f lib/bs/.compiler.log ] || ! tail -1 lib/bs/.compiler.log 2>/dev/null | grep -q '^#Done'; do sleep 1; done && echo 'ReScript ready, starting client...' && make dev-client"]
env:
FRONTMAN_INTERNAL_DEV: "true"
nextjs-bundle:
cmd: ["bash", "-c", "echo 'Waiting for ReScript compiler...' && while [ ! -f lib/bs/.compiler.log ] || ! tail -1 lib/bs/.compiler.log 2>/dev/null | grep -q '^#Done'; do sleep 1; done && echo 'ReScript ready, starting tsup watch...' && cd libs/frontman-nextjs && yarn tsup --watch"]
astro-bundle:
cmd: ["bash", "-c", "echo 'Waiting for ReScript compiler...' && while [ ! -f lib/bs/.compiler.log ] || ! tail -1 lib/bs/.compiler.log 2>/dev/null | grep -q '^#Done'; do sleep 1; done && echo 'ReScript ready, starting tsup watch...' && cd libs/frontman-astro && yarn tsup --watch"]
nextjs:
cmd: ["bash", "-c", "echo 'Waiting for ReScript compiler...' && while [ ! -f lib/bs/.compiler.log ] || ! tail -1 lib/bs/.compiler.log 2>/dev/null | grep -q '^#Done'; do sleep 1; done && echo 'ReScript ready. Waiting for nextjs bundle...' && until [ libs/frontman-nextjs/dist/index.js -nt lib/bs/.compiler.log ] && [ libs/frontman-nextjs/dist/instrumentation.js -nt lib/bs/.compiler.log ]; do sleep 1; done && echo 'Bundle ready, starting Next.js...' && export FRONTMAN_CLIENT_URL=https://${WORKTREE_HASH}.vite.frontman.local/src/Main.res.mjs && export FRONTMAN_HOST=${WORKTREE_HASH}.api.frontman.local && make dev-nextjs-prebuilt"]
env:
FRONTMAN_INTERNAL_DEV: "true"
marketing:
cmd: ["bash", "-c", "echo 'Waiting for ReScript compiler...' && while [ ! -f lib/bs/.compiler.log ] || ! tail -1 lib/bs/.compiler.log 2>/dev/null | grep -q '^#Done'; do sleep 1; done && echo 'ReScript ready. Waiting for astro bundle...' && while [ ! -f libs/frontman-astro/dist/integration.js ]; do sleep 1; done && echo 'Bundle ready. Waiting for server...' && while ! (: > /dev/tcp/localhost/4000) 2>/dev/null; do sleep 1; done && echo 'Server ready, starting marketing...' && export FRONTMAN_CLIENT_URL=https://${WORKTREE_HASH}.vite.frontman.local/src/Main.res.mjs && export FRONTMAN_HOST=${WORKTREE_HASH}.api.frontman.local && cd apps/marketing && yarn dev --host 0.0.0.0"]