-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.test.yml
More file actions
58 lines (55 loc) · 1.52 KB
/
compose.test.yml
File metadata and controls
58 lines (55 loc) · 1.52 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
# Testing - docker compose -f compose.test.yml up --build --abort-on-container-exit
services:
db:
container_name: barae-test-db
image: postgres:17-alpine
environment:
POSTGRES_USER: barae
POSTGRES_PASSWORD: testpassword
POSTGRES_DB: barae_test
tmpfs:
- /var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d barae_test -U barae"]
interval: 2s
timeout: 2s
retries: 10
mailpit:
container_name: barae-test-mailpit
image: axllent/mailpit:latest
environment:
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
backend:
container_name: barae-test-backend
build:
context: .
dockerfile: Dockerfile.backend
target: prod
depends_on:
db:
condition: service_healthy
mailpit:
condition: service_started
environment:
POSTGRES_HOST: db
POSTGRES_PORT: 5432
POSTGRES_USER: barae
POSTGRES_PASSWORD: testpassword
POSTGRES_DB: barae_test
SERVER_HOST: 0.0.0.0
SERVER_PORT: 3000
APP_SECRET: test-secret-for-ci-at-least-32-characters-long
SMTP_HOST: mailpit
SMTP_PORT: 1025
SMTP_SECURE: "false"
EMAIL_FROM: "Barae <noreply@barae.local>"
AUTH_BASE_URL: http://localhost:3000/api/v1
ports:
- "3000:3000"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/health"]
interval: 5s
timeout: 3s
retries: 30
start_period: 10s