-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.e2e.yaml
More file actions
82 lines (76 loc) · 1.69 KB
/
Copy pathcompose.e2e.yaml
File metadata and controls
82 lines (76 loc) · 1.69 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
services:
caddy:
image: caddy:2.10
ports:
- "18080:8080"
volumes:
- ./deploy/Caddyfile.e2e:/etc/caddy/Caddyfile:ro
depends_on:
app:
condition: service_healthy
networks:
- edge
- internal
postgres:
image: postgres:18
environment:
POSTGRES_DB: almanac
POSTGRES_USER: almanac
POSTGRES_PASSWORD: e2e-password
healthcheck:
test: ["CMD-SHELL", "pg_isready -U almanac -d almanac"]
interval: 2s
timeout: 2s
retries: 30
networks:
- internal
storage-init:
build: .
user: "0:0"
command: ["sh", "-c", "find /data ! -user almanac -exec chown almanac:almanac {} +"]
volumes:
- persistent_data:/data
restart: "no"
migrate:
build: .
env_file: deploy/e2e.env
command: ["ai-almanac", "db", "upgrade"]
depends_on:
postgres:
condition: service_healthy
storage-init:
condition: service_completed_successfully
volumes:
- persistent_data:/data
networks:
- internal
restart: "no"
app:
build: .
env_file: deploy/e2e.env
command: ["ai-almanac", "serve", "--bind", "0.0.0.0", "--port", "8765", "--no-open"]
depends_on:
migrate:
condition: service_completed_successfully
volumes:
- persistent_data:/data
- ./testdata:/datasets:ro
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8765/ready')",
]
interval: 2s
timeout: 2s
retries: 30
networks:
- internal
networks:
edge:
internal:
internal: true
volumes:
persistent_data: