Ensure web service is available to celery service

This commit is contained in:
Lacey Williams Henschel
2023-06-01 15:16:21 -07:00
parent d1b3da670c
commit 04fb00e4b0
2 changed files with 12 additions and 0 deletions

View File

@@ -90,6 +90,9 @@ services:
dockerfile: docker/Dockerfile
command:
[
"/bin/bash",
"-c",
"./wait-for-it.sh &&",
"celery",
"-A",
"config",
@@ -104,6 +107,9 @@ services:
depends_on:
- db
- redis
volumes:
- .:/code
- ./wait-for-it.sh:/wait-for-it.sh
celery-beat:
build:

6
wait-for-it.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
# Wait for the other container to be ready
while ! nc -z web 8000; do
sleep 1
done