Spaces:
Running
Running
e2e dockerfile
Browse files- .github/workflows/e2e.yml +4 -4
- e2e/docker-compose.e2e.yml +3 -21
.github/workflows/e2e.yml
CHANGED
|
@@ -49,13 +49,13 @@ jobs:
|
|
| 49 |
sleep 2
|
| 50 |
done
|
| 51 |
|
| 52 |
-
# Wait for frontend
|
| 53 |
for i in {1..30}; do
|
| 54 |
-
if curl -f http://localhost:
|
| 55 |
-
echo "
|
| 56 |
break
|
| 57 |
fi
|
| 58 |
-
echo "Waiting for
|
| 59 |
sleep 2
|
| 60 |
done
|
| 61 |
|
|
|
|
| 49 |
sleep 2
|
| 50 |
done
|
| 51 |
|
| 52 |
+
# Wait for application (frontend served by backend)
|
| 53 |
for i in {1..30}; do
|
| 54 |
+
if curl -f http://localhost:7860 > /dev/null 2>&1; then
|
| 55 |
+
echo "Application is ready"
|
| 56 |
break
|
| 57 |
fi
|
| 58 |
+
echo "Waiting for application..."
|
| 59 |
sleep 2
|
| 60 |
done
|
| 61 |
|
e2e/docker-compose.e2e.yml
CHANGED
|
@@ -36,10 +36,10 @@ services:
|
|
| 36 |
timeout: 5s
|
| 37 |
retries: 5
|
| 38 |
|
| 39 |
-
# Backend
|
| 40 |
-
|
| 41 |
build:
|
| 42 |
-
context:
|
| 43 |
dockerfile: Dockerfile
|
| 44 |
environment:
|
| 45 |
ENV: e2e
|
|
@@ -63,24 +63,6 @@ services:
|
|
| 63 |
timeout: 5s
|
| 64 |
retries: 5
|
| 65 |
|
| 66 |
-
# Frontend
|
| 67 |
-
frontend:
|
| 68 |
-
build:
|
| 69 |
-
context: ../frontend
|
| 70 |
-
dockerfile: Dockerfile
|
| 71 |
-
environment:
|
| 72 |
-
VITE_API_BASE_URL: http://localhost:7860
|
| 73 |
-
ports:
|
| 74 |
-
- "3000:3000"
|
| 75 |
-
depends_on:
|
| 76 |
-
backend:
|
| 77 |
-
condition: service_healthy
|
| 78 |
-
healthcheck:
|
| 79 |
-
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
| 80 |
-
interval: 10s
|
| 81 |
-
timeout: 5s
|
| 82 |
-
retries: 5
|
| 83 |
-
|
| 84 |
volumes:
|
| 85 |
postgres_e2e_data:
|
| 86 |
minio_e2e_data:
|
|
|
|
| 36 |
timeout: 5s
|
| 37 |
retries: 5
|
| 38 |
|
| 39 |
+
# Application (Frontend + Backend combined)
|
| 40 |
+
app:
|
| 41 |
build:
|
| 42 |
+
context: ..
|
| 43 |
dockerfile: Dockerfile
|
| 44 |
environment:
|
| 45 |
ENV: e2e
|
|
|
|
| 63 |
timeout: 5s
|
| 64 |
retries: 5
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
volumes:
|
| 67 |
postgres_e2e_data:
|
| 68 |
minio_e2e_data:
|