mirror of
https://github.com/f/awesome-chatgpt-prompts.git
synced 2026-03-03 03:07:00 +00:00
Fix: Docker login configuration error by adjusting startup order
This commit is contained in:
@@ -109,9 +109,9 @@ else
|
|||||||
cd "$APP_DIR"
|
cd "$APP_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start supervisor (manages PostgreSQL and Next.js)
|
# Start PostgreSQL
|
||||||
echo "▶ Starting services..."
|
echo "▶ Starting PostgreSQL..."
|
||||||
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf &
|
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf --start postgresql &
|
||||||
SUPERVISOR_PID=$!
|
SUPERVISOR_PID=$!
|
||||||
|
|
||||||
# Wait for PostgreSQL
|
# Wait for PostgreSQL
|
||||||
@@ -130,9 +130,14 @@ done
|
|||||||
|
|
||||||
# Run migrations
|
# Run migrations
|
||||||
echo "▶ Running database migrations..."
|
echo "▶ Running database migrations..."
|
||||||
|
cd "$APP_DIR"
|
||||||
npx prisma migrate deploy
|
npx prisma migrate deploy
|
||||||
echo "✓ Migrations complete"
|
echo "✓ Migrations complete"
|
||||||
|
|
||||||
|
# Start Next.js
|
||||||
|
echo "▶ Starting Next.js..."
|
||||||
|
/usr/bin/supervisorctl -c /etc/supervisor/conf.d/supervisord.conf start nextjs
|
||||||
|
|
||||||
# Seed on first run only
|
# Seed on first run only
|
||||||
SEED_MARKER="/data/.seeded"
|
SEED_MARKER="/data/.seeded"
|
||||||
if [ ! -f "$SEED_MARKER" ]; then
|
if [ ! -f "$SEED_MARKER" ]; then
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ stderr_logfile=/var/log/supervisor/postgresql-error.log
|
|||||||
command=node /data/app/.next/standalone/server.js
|
command=node /data/app/.next/standalone/server.js
|
||||||
directory=/data/app
|
directory=/data/app
|
||||||
user=root
|
user=root
|
||||||
autostart=true
|
autostart=false
|
||||||
autorestart=true
|
autorestart=true
|
||||||
priority=20
|
priority=20
|
||||||
startsecs=10
|
startsecs=10
|
||||||
|
|||||||
Reference in New Issue
Block a user