Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

fix: running alembic migration twice

dextmorgn8019f6842fe5
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index e46fcf9a..1901ce91 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -124,6 +124,7 @@ services:
- NEO4J_PASSWORD=${NEO4J_PASSWORD}
- MASTER_VAULT_KEY_V1=${MASTER_VAULT_KEY_V1}
- REDIS_URL=redis://redis:6379/0
+ - SKIP_MIGRATIONS=true
depends_on:
postgres:
condition: service_healthy
@@ -131,6 +132,8 @@ services:
condition: service_healthy
neo4j:
condition: service_healthy
+ api:
+ condition: service_healthy
networks:
- flowsint_network
diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml
index 23c73016..846a014e 100644
--- a/docker-compose.prod.yml
+++ b/docker-compose.prod.yml
@@ -117,6 +117,7 @@ services:
- NEO4J_PASSWORD=${NEO4J_PASSWORD}
- MASTER_VAULT_KEY_V1=${MASTER_VAULT_KEY_V1}
- REDIS_URL=redis://redis:6379/0
+ - SKIP_MIGRATIONS=true
depends_on:
postgres:
condition: service_healthy
@@ -124,6 +125,8 @@ services:
condition: service_healthy
neo4j:
condition: service_healthy
+ api:
+ condition: service_healthy
networks:
- flowsint_network
diff --git a/flowsint-api/entrypoint.sh b/flowsint-api/entrypoint.sh
index d77c9ba8..82265ba7 100755
--- a/flowsint-api/entrypoint.sh
+++ b/flowsint-api/entrypoint.sh
@@ -1,8 +1,12 @@
#!/bin/sh
set -e
-echo "Running database migrations..."
-alembic upgrade head
+if [ "$SKIP_MIGRATIONS" != "true" ]; then
+ echo "Running database migrations..."
+ alembic upgrade head
+else
+ echo "Skipping database migrations (SKIP_MIGRATIONS=true)..."
+fi
echo "Starting application..."
exec "$@"