-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
96 lines (91 loc) · 2.62 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
96 lines (91 loc) · 2.62 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
# =============================================================================
# Folo — Release integration test stack
# For CI/release testing only. Credentials are not real — do not use in prod.
# Usage: IMAGE_TAG=0.10.0 docker compose -f docker-compose.test.yml up -d --wait
# =============================================================================
services:
postgres:
image: postgres:17-alpine
container_name: folo-test-postgres
environment:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: folo_test
tmpfs:
- /var/lib/postgresql/data
ports:
- "15432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d folo_test"]
interval: 5s
timeout: 3s
retries: 5
networks:
- folo-test-net
redis:
image: redis:8-alpine
container_name: folo-test-redis
command: redis-server --requirepass testredis
tmpfs:
- /data
ports:
- "16379:6379"
healthcheck:
test: ["CMD-SHELL", "REDISCLI_AUTH=testredis redis-cli ping"]
interval: 5s
timeout: 3s
retries: 5
networks:
- folo-test-net
forage:
image: jhangyu/forage:${IMAGE_TAG:-latest}
container_name: forage-test
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
NODE_ENV: production
DATABASE_URL: postgresql://testuser:testpass@folo-test-postgres:5432/folo_test
REDIS_URL: redis://:testredis@folo-test-redis:6379
PORT: 3000
BETTER_AUTH_URL: http://localhost:13000
AUTH_SECRET: test-secret-for-ci-only-at-least-32chars
CORS_ORIGIN: http://localhost:12234
AUTH_TRUSTED_ORIGINS: http://localhost:13000,http://localhost:12234
ports:
- "13000:3000"
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
networks:
- folo-test-net
folo:
image: jhangyu/folo:${IMAGE_TAG:-latest}
container_name: folo-test
depends_on:
forage:
condition: service_healthy
environment:
NODE_ENV: production
VITE_SELF_HOSTED: "true"
VITE_API_URL: http://forage-test:3000
VITE_EXTERNAL_API_URL: http://localhost:13000
VITE_WEB_URL: http://localhost:12234
ports:
- "12234:2234"
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:2234/ || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
networks:
- folo-test-net
networks:
folo-test-net:
driver: bridge