-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add e2e tests #3054
base: main
Are you sure you want to change the base?
feat: add e2e tests #3054
Changes from all commits
e64a456
c7a8b86
24b49dc
3c3014f
4df2cc2
305a59b
fc19afd
b0f4b97
66a01b2
56b32db
7623917
6b01805
b02ca96
6e21f22
461742e
3b7d1f4
2b3db30
3b35ba1
bb82f50
58e44ea
d3ae308
2a3bf9a
59bc901
755350a
bd40c23
73b8cde
a13d273
2d23bf3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
services: | ||
## Keep Services with NO_AUTH | ||
# Database Service | ||
keep-database: | ||
image: mysql:latest | ||
environment: | ||
|
@@ -14,6 +16,7 @@ services: | |
timeout: 5s | ||
retries: 5 | ||
|
||
# Frontend Services | ||
keep-frontend: | ||
extends: | ||
file: docker-compose.common.yml | ||
|
@@ -28,6 +31,7 @@ services: | |
- FRIGADE_DISABLED=true | ||
- SENTRY_DISABLED=true | ||
|
||
# Backend Services | ||
keep-backend: | ||
extends: | ||
file: docker-compose.common.yml | ||
|
@@ -46,6 +50,81 @@ services: | |
keep-database: | ||
condition: service_healthy | ||
|
||
|
||
## Keep Services with DB | ||
# Database Service (5433) | ||
keep-database-db-auth: | ||
image: mysql:latest | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=keep | ||
- MYSQL_DATABASE=keep | ||
volumes: | ||
- mysql-data:/var/lib/mysql-auth-db | ||
ports: | ||
- "3307:3306" | ||
healthcheck: | ||
test: ["CMD-SHELL", "mysqladmin ping -h localhost"] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
# Frontend Services (3001) | ||
keep-frontend-db-auth: | ||
build: | ||
context: ./keep-ui/ | ||
dockerfile: ../docker/Dockerfile.ui | ||
ports: | ||
- "3001:3000" | ||
environment: | ||
- NEXTAUTH_SECRET=secret | ||
- NEXTAUTH_URL=http://localhost:3001 | ||
- NEXT_PUBLIC_API_URL=http://localhost:8081 | ||
- POSTHOG_KEY=phc_muk9qE3TfZsX3SZ9XxX52kCGJBclrjhkP9JxAQcm1PZ | ||
- POSTHOG_HOST=https://ingest.keephq.dev | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove POSTHOG keys from here and set POSTHOG_DISABLED=true |
||
- NEXT_PUBLIC_SENTRY_DSN=https://0d4d59e3105ffe8afa27dcb95a222009@o4505515398922240.ingest.us.sentry.io/4508258058764288 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sentry as well, I don't think we need it :) |
||
- PUSHER_HOST=localhost | ||
- PUSHER_PORT=6001 | ||
- PUSHER_APP_KEY=keepappkey | ||
- NEXT_PUBLIC_KEEP_VERSION=0.2.9 | ||
- AUTH_TYPE=DB | ||
- API_URL=http://keep-backend-db-auth:8080 | ||
- POSTHOG_DISABLED=true | ||
- FRIGADE_DISABLED=true | ||
- SENTRY_DISABLED=true | ||
|
||
# Backend Services (8081) | ||
keep-backend-db-auth: | ||
build: | ||
context: . | ||
dockerfile: docker/Dockerfile.api | ||
ports: | ||
- "8081:8080" | ||
environment: | ||
- PORT=8080 | ||
- SECRET_MANAGER_TYPE=FILE | ||
- SECRET_MANAGER_DIRECTORY=/state | ||
- OPENAI_API_KEY=$OPENAI_API_KEY | ||
- PUSHER_APP_ID=1 | ||
- PUSHER_APP_KEY=keepappkey | ||
- PUSHER_APP_SECRET=keepappsecret | ||
- PUSHER_HOST=keep-websocket-server | ||
- PUSHER_PORT=6001 | ||
- USE_NGROK=false | ||
- AUTH_TYPE=DB | ||
- DATABASE_CONNECTION_STRING=mysql+pymysql://root:keep@keep-database-db-auth:3306/keep | ||
- POSTHOG_DISABLED=true | ||
- FRIGADE_DISABLED=true | ||
- SECRET_MANAGER_DIRECTORY=/app | ||
- SQLALCHEMY_WARN_20=1 | ||
- KEEP_JWT_SECRET=verysecretkey | ||
- KEEP_DEFAULT_USERNAME=keep | ||
- KEEP_DEFAULT_PASSWORD=keep | ||
depends_on: | ||
keep-database-db-auth: | ||
condition: service_healthy | ||
|
||
|
||
# Other Services (Common) | ||
keep-websocket-server: | ||
extends: | ||
file: docker-compose.common.yml | ||
|
@@ -59,5 +138,20 @@ services: | |
ports: | ||
- "9090:9090" | ||
|
||
grafana: | ||
image: grafana/grafana-enterprise:10.4.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why 10.4? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dunno, picked from ./keep/providers/grafana_provider/grafana |
||
user: "472" # Grafana's default user ID | ||
ports: | ||
- "3002:3000" | ||
volumes: | ||
- ./keep/providers/grafana_provider/grafana/provisioning:/etc/grafana/provisioning:ro | ||
- ./keep/providers/grafana_provider/grafana/grafana.ini:/etc/grafana/grafana.ini:ro | ||
- grafana-storage:/var/lib/grafana | ||
environment: | ||
- GF_SECURITY_ADMIN_PASSWORD=admin | ||
depends_on: | ||
- prometheus-server-for-test-target | ||
|
||
volumes: | ||
mysql-data: | ||
grafana-storage: {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
services: | ||
## Keep Services with NO_AUTH | ||
# Database Service | ||
keep-database: | ||
image: postgres:13 | ||
environment: | ||
|
@@ -12,6 +14,7 @@ services: | |
- ./postgres-custom.conf:/etc/postgresql/conf.d/custom.conf | ||
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d | ||
|
||
# Frontend Services | ||
keep-frontend: | ||
extends: | ||
file: docker-compose.common.yml | ||
|
@@ -26,6 +29,7 @@ services: | |
- FRIGADE_DISABLED=true | ||
- SENTRY_DISABLED=true | ||
|
||
# Backend Services | ||
keep-backend: | ||
extends: | ||
file: docker-compose.common.yml | ||
|
@@ -43,6 +47,73 @@ services: | |
depends_on: | ||
- keep-database | ||
|
||
|
||
## Keep Services with DB | ||
# Database Service (5433) | ||
keep-database-db-auth: | ||
image: postgres:13 | ||
environment: | ||
POSTGRES_USER: keepuser | ||
POSTGRES_PASSWORD: keeppassword | ||
POSTGRES_DB: keepdb | ||
ports: | ||
- "5433:5432" | ||
volumes: | ||
- postgres-data:/var/lib/postgresql-auth-db/data | ||
- ./postgres-custom.conf:/etc/postgresql-auth-db/conf.d/custom.conf | ||
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d | ||
|
||
# Frontend Services (3001) | ||
keep-frontend-db-auth: | ||
build: | ||
context: ./keep-ui/ | ||
dockerfile: ../docker/Dockerfile.ui | ||
ports: | ||
- "3001:3000" | ||
environment: | ||
- NEXTAUTH_SECRET=secret | ||
- NEXTAUTH_URL=http://localhost:3001 | ||
- NEXT_PUBLIC_API_URL=http://localhost:8081 | ||
- POSTHOG_KEY=phc_muk9qE3TfZsX3SZ9XxX52kCGJBclrjhkP9JxAQcm1PZ | ||
- POSTHOG_HOST=https://ingest.keephq.dev | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This Posthog key too |
||
- AUTH_TYPE=DB | ||
- API_URL=http://keep-backend-db-auth:8080 | ||
- POSTHOG_DISABLED=true | ||
- FRIGADE_DISABLED=true | ||
- SENTRY_DISABLED=true | ||
|
||
# Backend Services (8081) | ||
keep-backend-db-auth: | ||
build: | ||
context: . | ||
dockerfile: docker/Dockerfile.api | ||
ports: | ||
- "8081:8080" | ||
environment: | ||
- PORT=8080 | ||
- SECRET_MANAGER_TYPE=FILE | ||
- SECRET_MANAGER_DIRECTORY=/state | ||
- OPENAI_API_KEY=$OPENAI_API_KEY | ||
- PUSHER_APP_ID=1 | ||
- PUSHER_APP_KEY=keepappkey | ||
- PUSHER_APP_SECRET=keepappsecret | ||
- PUSHER_HOST=keep-websocket-server | ||
- PUSHER_PORT=6001 | ||
- USE_NGROK=false | ||
- AUTH_TYPE=DB | ||
- DATABASE_CONNECTION_STRING=postgresql+psycopg2://keepuser:keeppassword@keep-database-db-auth:5432/keepdb | ||
- POSTHOG_DISABLED=true | ||
- FRIGADE_DISABLED=true | ||
- SECRET_MANAGER_DIRECTORY=/app | ||
- SQLALCHEMY_WARN_20=1 | ||
- KEEP_JWT_SECRET=verysecretkey | ||
- KEEP_DEFAULT_USERNAME=keep | ||
- KEEP_DEFAULT_PASSWORD=keep | ||
depends_on: | ||
- keep-database-db-auth | ||
|
||
|
||
# Other Services (Common) | ||
keep-websocket-server: | ||
extends: | ||
file: docker-compose.common.yml | ||
|
@@ -56,5 +127,20 @@ services: | |
ports: | ||
- "9090:9090" | ||
|
||
grafana: | ||
image: grafana/grafana-enterprise:10.4.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. y? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dunno, picked from ./keep/providers/grafana_provider/grafana There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's go with 11.4.0. "Latest" here will bring instability to our tests. |
||
user: "472" # Grafana's default user ID | ||
ports: | ||
- "3002:3000" | ||
volumes: | ||
- ./keep/providers/grafana_provider/grafana/provisioning:/etc/grafana/provisioning:ro | ||
- ./keep/providers/grafana_provider/grafana/grafana.ini:/etc/grafana/grafana.ini:ro | ||
- grafana-storage:/var/lib/grafana | ||
environment: | ||
- GF_SECURITY_ADMIN_PASSWORD=admin | ||
depends_on: | ||
- prometheus-server-for-test-target | ||
|
||
volumes: | ||
postgres-data: | ||
grafana-storage: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@35C4n0r check, here also keep-database-1 is getting created: /~https://github.com/keephq/keep/actions/runs/12844511458/job/35817583885#step:12:2243
but
until docker exec $(docker ps -qf "name=keep-database") pg_isready -h localhost -U keepuser; do
/~https://github.com/keephq/keep/actions/runs/12844511458/job/35817583885#step:13:67 still works