-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.test.yaml
44 lines (42 loc) · 1.18 KB
/
docker-compose.test.yaml
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
name: "health-checker-test"
services:
backend-test:
container_name: backend-test
build: ./back
command: sh -c "npm run seed && npm run test"
environment:
APP_ENV: ${APP_ENV}
BACKEND_PORT: ${BACKEND_PORT}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
TZ: Europe/Paris
LC_ALL: fr_FR.UTF-8
depends_on:
database-test:
condition: service_healthy
frontend-test:
container_name: frontend-test
build: ./front
command: npm run test
environment:
APP_ENV: ${APP_ENV}
VITE_API_URL: ${VITE_API_URL}
TZ: Europe/Paris
LC_ALL: fr_FR.UTF-8
database-test:
container_name: database-test
image: postgres
environment:
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 20