xdxb commited on
Commit
a0a1efe
·
verified ·
1 Parent(s): a0bf9d4

Create docker-entrypoint.sh

Browse files
Files changed (1) hide show
  1. docker-entrypoint.sh +20 -0
docker-entrypoint.sh ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ # Start Redis server in the background
5
+ redis-server --daemonize yes
6
+
7
+ # Wait for Redis to be ready
8
+ until redis-cli ping; do
9
+ echo "Waiting for Redis to be ready..."
10
+ sleep 1
11
+ done
12
+
13
+ # Start Celery worker in the background
14
+ celery -A celery_worker.celery worker --pool=solo -l info &
15
+
16
+ # Wait for Celery to initialize
17
+ sleep 2
18
+
19
+ # Start Flask application with Waitress
20
+ waitress-serve --host=$HOST --port=$PORT app:app