23 lines
477 B
Bash
23 lines
477 B
Bash
#!/bin/sh
|
|
|
|
# Create nginx pid directory
|
|
mkdir -p /run/nginx
|
|
|
|
# Start backend (NestJS)
|
|
echo "Starting backend on port 3001..."
|
|
cd /app/backend && NODE_ENV=production node dist/main.js &
|
|
|
|
# Give backend a moment to start
|
|
sleep 2
|
|
|
|
# Start frontend (Next.js standalone)
|
|
echo "Starting frontend on port 3000..."
|
|
cd /app/frontend && PORT=3000 HOSTNAME=0.0.0.0 node server.js &
|
|
|
|
# Give frontend a moment to start
|
|
sleep 2
|
|
|
|
# Start nginx
|
|
echo "Starting nginx..."
|
|
nginx -g 'daemon off;'
|