-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
68 lines (63 loc) · 1.77 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
68 lines (63 loc) · 1.77 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
version: '3.8'
# Dexie Cloud SDK E2E Test Stack
# Usage: docker compose -f docker-compose.test.yml up -d --build
services:
postgres:
image: postgres:17
environment:
POSTGRES_USER: dexiecloud
POSTGRES_PASSWORD: testpass123
POSTGRES_DB: dexiecloud
ports:
- "5439:5432"
volumes:
- ../dexie-cloud/libs/dexie-cloud-server/sql/create-schema.pgsql:/docker-entrypoint-initdb.d/01-schema.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dexiecloud -d dexiecloud"]
interval: 3s
timeout: 5s
retries: 10
networks:
- sdk-test
mailhog:
image: mailhog/mailhog:latest
ports:
- "1026:1025"
- "8026:8025"
networks:
- sdk-test
dexie-cloud-server:
build:
context: ../dexie-cloud/libs/dexie-cloud-server
dockerfile: Dockerfile
command: ["node", "dexie-cloud-server.js"]
environment:
POSTGRESQLCONNSTR_DEXIE_CLOUD: postgresql://dexiecloud:testpass123@postgres:5432/dexiecloud
JWT_SECRET: e2e-test-jwt-secret-key-12345
ISSUER: http://localhost:3000
PUBLIC_DB_CREATE: "true"
SMTP_HOST: mailhog
SMTP_PORT: 1025
SMTP_USER: test
SMTP_PASS: test
SMTP_REQUIRE_TLS: "false"
SYSTEM_EMAIL: "Dexie Cloud Test <test@dexie.local>"
NODE_ENV: test
PORT: 3000
DB_SECRET: e2e-test-db-secret-key-12345-for-blob-storage
ports:
- "3001:3000"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://localhost:3000/ready').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"]
interval: 5s
timeout: 10s
retries: 12
start_period: 10s
networks:
- sdk-test
networks:
sdk-test:
driver: bridge