diff --git a/docker-compose.yml b/docker-compose.yml index 9773da3..2d9ebe1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/filler/filler_db.py b/filler/filler_db.py index 9ed8d1d..1935f67 100644 --- a/filler/filler_db.py +++ b/filler/filler_db.py @@ -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.")