-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
72 lines (67 loc) · 1.7 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
version: "3.9"
services:
battleships-db:
container_name: battleships-db
build:
context: .
dockerfile: dockerfiles/Dockerfile-db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=daw_g03
ports:
- "5432:5432"
battleships-service-1:
container_name: battleships-service-1
depends_on:
- battleships-db
build:
context: .
dockerfile: dockerfiles/Dockerfile-spring
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://battleships-db/daw_g03
expose:
- "80"
battleships-service-2:
container_name: battleships-service-2
depends_on:
- battleships-service-1
build:
context: .
dockerfile: dockerfiles/Dockerfile-spring
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://battleships-db/daw_g03
expose:
- "80"
battleships-nginx:
container_name: battleships-nginx
depends_on:
- battleships-service-1
- battleships-service-2
build:
context: .
dockerfile: dockerfiles/Dockerfile-nginx
ports:
- "80:80"
volumes:
- ./dockerfiles/nginx:/etc/nginx
battleships-db-test:
container_name: battleships-db-test
build:
context: .
dockerfile: dockerfiles/Dockerfile-db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=daw_g03_test
ports:
- "5432:5432"
battleships-test:
container_name: battleships-test
depends_on:
- battleships-db-test
build:
context: .
dockerfile: dockerfiles/Dockerfile-test
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://battleships-db-test/daw_g03_test