-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
85 lines (79 loc) · 1.88 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
version: '3.8'
services:
# MySQL
mysql-db:
restart: on-failure
image: mysql:5.7
container_name: mysql-db
networks:
- foodnet
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: FoodSpring
MYSQL_PASSWORD: root
ports:
- "3308:3306"
volumes:
- db-data:/var/lib/mysql
# Spring Boot App
spring-app:
restart: on-failure
networks:
- foodnet
build:
context: ./
dockerfile: Dockerfile
container_name: foodspring
ports:
- "8080:8081"
environment:
SPRING_PROFILES_ACTIVE: staging
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_RABBITMQ_PORT: 5672
SPRING_RABBITMQ_USERNAME: guest
SPRING_RABBITMQ_PASSWORD: guest
SPRING_RABBITMQ_LISTENER_ACKNOWLEDGE-MODE: manual
SPRING_DATASOURCE_URL: jdbc:mysql://mysql-db:3306/FoodSpring?useSSL=false&serverTimezone=Asia/Jakarta&allowPublicKeyRetrieval=true
depends_on:
- mysql-db
mailer:
restart: always
image: hakimamarullah/foodspring-mailer:v1.0.0
container_name: foodspring-mailer
networks:
- foodnet
ports:
- "8000:8000"
environment:
SPRING_PROFILES_ACTIVE: staging
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_RABBITMQ_PORT: 5672
SPRING_RABBITMQ_USERNAME: guest
SPRING_RABBITMQ_PASSWORD: guest
SPRING_RABBITMQ_LISTENER_ACKNOWLEDGE-MODE: manual
depends_on:
- rabbitmq
# RabbitMQ
rabbitmq:
restart: always
hostname: 'rabbitmq'
image: rabbitmq:management
container_name: rabbitmq
networks:
- foodnet
ports:
- "5673:5672"
- "15673:15672"
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
volumes:
- rabbitmq-data:/var/lib/rabbitmq/mnesia
volumes:
db-data:
driver: local
rabbitmq-data:
driver: local
networks:
foodnet:
driver: bridge