up
This commit is contained in:
parent
8cad8986fc
commit
1fb166b16b
|
@ -30,11 +30,6 @@ services:
|
|||
- ./data.csv:/app/data.csv
|
||||
networks:
|
||||
- mynetwork
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "test", "-f", "/app/data_filled.signal"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
web:
|
||||
build: ./web
|
||||
|
@ -45,8 +40,10 @@ services:
|
|||
ports:
|
||||
- "8000:8000"
|
||||
depends_on:
|
||||
- db
|
||||
- filler
|
||||
db:
|
||||
condition: service_healthy
|
||||
filler:
|
||||
condition: service_completed_successfully
|
||||
networks:
|
||||
- mynetwork
|
||||
|
||||
|
|
|
@ -50,7 +50,3 @@ with connection.cursor() as cursor:
|
|||
cursor.execute("SELECT * FROM data")
|
||||
for row in cursor.fetchall():
|
||||
logger.info(f"Data: {row}")
|
||||
|
||||
with open('/app/data_filled.signal', 'w') as signal_file:
|
||||
signal_file.write('done')
|
||||
logger.info("Filler task completed. Signal file created.")
|
||||
|
|
Loading…
Reference in a new issue