-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
112 lines (104 loc) · 2.44 KB
/
docker-compose.yml
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
version: '3.3'
services:
postgres:
image: postgres:alpine
container_name: postgres
command: postgres -c 'max_connections=50'
ports:
- 5433:5432
restart: unless-stopped
volumes:
- ./data/dumps:/dumps
env_file:
- ./data/env/database.dev.env
fraud-service:
build:
context: ./fraud-service/
image: fraud-service:latest
container_name: fraud-service
depends_on:
- postgres
links:
- postgres
ports:
- 5000:5000
restart: unless-stopped
env_file:
- ./data/env/fraud-service.dev.env
backend:
build:
context: ./backend/
args:
PROFILE: dev
image: tutor-backend
container_name: backend
depends_on:
- postgres
- fraud-service
links:
- postgres
ports:
- 8080:8080
restart: unless-stopped
volumes:
- ./data/images:/images
- ./data/load:/load
- ./data/export:/export
env_file:
- ./data/env/backend.dev.env
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/tutordb
frontend:
build:
context: ./frontend/
dockerfile: Dockerfile
args:
NODE_ENV: dev
image: tutor-frontend
container_name: frontend
depends_on:
- backend
links:
- backend
ports:
- 8081:80
restart: unless-stopped
volumes:
- ./data/localhost-nginx.conf:/etc/nginx/nginx.conf
- ./data/error.log:/var/log/nginx/error.log
- ./data/access.log:/var/log/nginx/access.log
be-unit-tests:
image: maven:3
stop_signal: SIGKILL
stdin_open: true
tty: true
working_dir: $PWD/backend/
volumes:
- $PWD:$PWD
- ~/.m2:/root/.m2
command: mvn -Ptest test
integration-tests:
image: maven:3
stop_signal: SIGKILL
stdin_open: true
tty: true
depends_on:
- postgres
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/tutordb
- PSQL_INT_TEST_DB_USERNAME=engineer
- PSQL_INT_TEST_DB_PASSWORD=password
working_dir: $PWD/backend/
volumes:
- $PWD:$PWD
- ~/.m2:/root/.m2
command: mvn -Ptest-int integration-test
fe-unit-tests:
image: node:15.14.0-alpine3.13
stop_signal: SIGKILL
stdin_open: true
tty: true
working_dir: $PWD/frontend/
volumes:
- $PWD:$PWD
command: /bin/sh -c "npm install && npm run test:unit"