fix start

This commit is contained in:
2025-06-02 21:50:53 +02:00
parent b493446048
commit 44fd8433a1
2 changed files with 6 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ RUN mkdir -p /data/rooms && \
chown -R celery:celery /app chown -R celery:celery /app
# Create and set up startup script # Create and set up startup script
RUN echo '#!/bin/bash\n\ RUN printf '#!/bin/bash\n\
echo "Waiting for database..."\n\ echo "Waiting for database..."\n\
while ! nc -z db 5432; do\n\ while ! nc -z db 5432; do\n\
sleep 0.1\n\ sleep 0.1\n\
@@ -48,7 +48,7 @@ echo "Creating admin user..."\n\
flask create-admin\n\ flask create-admin\n\
\n\ \n\
echo "Starting application..."\n\ echo "Starting application..."\n\
exec "$@"' > /app/start.sh && \ exec "$@"\n' > /app/start.sh && \
chmod +x /app/start.sh && \ chmod +x /app/start.sh && \
chown celery:celery /app/start.sh chown celery:celery /app/start.sh

View File

@@ -17,8 +17,10 @@ services:
volumes: volumes:
- uploads:/data - uploads:/data
depends_on: depends_on:
- db db:
- redis condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"] test: ["CMD", "curl", "-f", "http://localhost:5000/health"]