-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (54 loc) · 1.32 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
version: '3.8'
services:
postgres:
image: postgres:12
container_name: postgres
environment:
POSTGRES_DB: retailorders
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- order-network
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
environment:
RABBITMQ_DEFAULT_VHOST: assessment
RABBITMQ_DEFAULT_PASS: rabbitmq
RABBITMQ_DEFAULT_USER: rabbitmq
ports:
- "5672:5672"
- "15672:15672"
networks:
- order-network
retail-orders:
build:
context: .
dockerfile: Dockerfile
image: retail-orders:latest
container_name: retail-orders-api
ports:
- "8080:8080"
depends_on:
- postgres
- rabbitmq
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/retailorders
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
SPRING_JPA_HIBERNATE_DDL_AUTO: update
SPRING_RABBITMQ_ADDRESS: rabbitmq:5672
SPRING_RABBITMQ_USERNAME: rabbitmq
SPRING_RABBITMQ_PASSWORD: rabbitmq
SPRING_RABBITMQ_VHOST: assessment
networks:
- order-network
volumes:
postgres_data:
networks:
order-network:
driver: bridge