forked from DevOps-2024-group-p/maxitwit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests_compose.yaml
54 lines (51 loc) · 1.11 KB
/
tests_compose.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
45
46
47
48
49
50
51
52
53
54
# Description: Docker Compose file for running tests
# This file is used in the CI/CD pipeline to run tests on the application
services:
test_db:
image: postgres:latest
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: testdb
PGPORT: 9999
ports:
- 9999:9999
networks:
- main
test_server:
container_name: test_server
build:
dockerfile: Dockerfile.app
context: .
target: test
ports:
- 3000:3000
networks:
- main
depends_on:
- test_db
environment:
- HUSKY=0
- DATABASE_URL=postgresql://postgres:postgres@test_db:9999/testdb
- SESSION_SECRET=secret
restart: always
test_api:
container_name: test_api
build:
dockerfile: Dockerfile.api
context: .
target: test
ports:
- 3001:3001
networks:
- main
depends_on:
- test_db
environment:
- HUSKY=0
- DATABASE_URL=postgresql://postgres:postgres@test_db:9999/testdb
- SESSION_SECRET=secret
restart: always
networks:
main:
name: maxitwit-test