-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
102 lines (99 loc) · 3.44 KB
/
docker-compose.test.yml
File metadata and controls
102 lines (99 loc) · 3.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: api-test
services:
ngrok:
image: ngrok/ngrok:latest
command:
- "http"
- "app:8000" # Changed to use the service name instead of host.docker.internal
environment:
NGROK_AUTHTOKEN: ${NGROK_AUTHTOKEN}
ports:
- 4040:4040 # Expose ngrok admin interface
# healthcheck:
# test: ["CMD", "curl", "-f", "http://${NGROK_HOST:-host.docker.internal}:4040/api/tunnels"]
# interval: 5s
# timeout: 10s
# retries: 3
app:
build:
context: .
dockerfile: Dockerfile.test
command: /bin/sh -c "bun install && bun run migrate-local && uv run pytest ${EXTRA_TEST_COMMAND}"
# -v tests/api/routes/test_run.py::test_free_user_concurrent_sessions
environment:
PYTEST_ADDOPTS: "-o log_cli=true -o log_cli_level=INFO -s"
# Default to host.docker.internal, override in CI
DATABASE_URL: "postgresql://postgres:postgres@${DB_HOST:-host.docker.internal}:5432/verceldb"
JWT_SECRET: "ecda23ae49fd47b91003762317470996d2c3f97d4285f21d703cbdcad586a054"
CURRENT_API_URL: "${CURRENT_API_URL}"
# Default to host.docker.internal, override in CI
UPSTASH_REDIS_META_REST_URL: "http://${REDIS_HOST:-host.docker.internal}:80"
UPSTASH_REDIS_META_REST_TOKEN: "example_token"
# Default to host.docker.internal, override in CI
MODAL_TOKEN_ID: ${MODAL_TOKEN_ID}
MODAL_TOKEN_SECRET: ${MODAL_TOKEN_SECRET}
SPACES_BUCKET_V2: "comfy-deploy-output-dev"
SPACES_ENDPOINT_V2: "https://comfy-deploy-output-dev.s3.amazonaws.com"
SPACES_REGION_V2: "us-east-2"
SPACES_KEY_V2: ${SPACES_KEY_V2}
SPACES_SECRET_V2: ${SPACES_SECRET_V2}
NGROK_HOST: ${NGROK_HOST:-host.docker.internal}
AUTUMN_SECRET_KEY: ${AUTUMN_SECRET_KEY}
# REDIS_URL_REALTIME: redis://host.docker.internal:6379/0
# UPSTASH_REDIS_REST_URL_REALTIME=: "http://${REDIS_HOST:-host.docker.internal}:80"
# UPSTASH_REDIS_REST_TOKEN_REALTIME=: "example_token"
# UPSTASH_REDIS_REST_URL_LOG=: "http://${REDIS_HOST:-host.docker.internal}:80"
# UPSTASH_REDIS_REST_TOKEN_LOG=: "example_token"
volumes:
- .:/app
depends_on:
ngrok:
condition: service_started
serverless-redis-http:
condition: service_started
pg_proxy:
condition: service_started
redis:
condition: service_started
postgres:
condition: service_healthy
ports:
- "8000:8000"
postgres:
image: "postgres:15.2-alpine"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: verceldb
ports:
- "5480:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
pg_proxy:
image: ghcr.io/neondatabase/wsproxy:latest
environment:
APPEND_PORT: "postgres:5432"
ALLOW_ADDR_REGEX: ".*"
LOG_TRAFFIC: "true"
ports:
- "5481:80"
depends_on:
- postgres
redis:
image: redis:latest
restart: always
ports:
- "6379:6379"
volumes:
- ./redis:/data
serverless-redis-http:
ports:
- "8079:80"
image: hiett/serverless-redis-http:latest
environment:
SRH_MODE: env
SRH_TOKEN: example_token
SRH_CONNECTION_STRING: "redis://redis:6379" # Using `redis` hostname since they're in the same Docker network.