2024-03-16 15:51:34 +01:00
|
|
|
# Run migrations
|
2024-05-10 23:46:01 +02:00
|
|
|
node ./db/migrations/$DB_DIALECT/migrate.cjs ./db/migrations/$DB_DIALECT
|
2024-03-16 15:51:34 +01:00
|
|
|
|
2024-09-16 18:10:58 +02:00
|
|
|
# Start nginx proxy
|
|
|
|
|
# 1. Replace the HOSTNAME in the nginx template file
|
|
|
|
|
# 2. Create the nginx configuration file from the template
|
|
|
|
|
# 3. Start the nginx server
|
|
|
|
|
envsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf
|
|
|
|
|
nginx -g 'daemon off;' &
|
|
|
|
|
|
2024-03-25 21:09:40 +01:00
|
|
|
# Start Redis
|
2024-05-12 16:28:44 +02:00
|
|
|
redis-server /app/redis.conf &
|
2024-03-25 21:09:40 +01:00
|
|
|
|
2024-04-07 11:32:29 +02:00
|
|
|
# Run the tasks backend
|
|
|
|
|
node apps/tasks/tasks.cjs &
|
|
|
|
|
|
|
|
|
|
node apps/websocket/wssServer.cjs &
|
2024-03-16 15:51:34 +01:00
|
|
|
|
|
|
|
|
# Run the nextjs server
|
2024-05-16 21:26:07 +02:00
|
|
|
node apps/nextjs/server.js & PID=$!
|
|
|
|
|
|
|
|
|
|
wait $PID
|