-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (42 loc) · 985 Bytes
/
docker-compose.yml
File metadata and controls
48 lines (42 loc) · 985 Bytes
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
version: "3.1"
services:
app:
container_name: ApplicationServiceAPI
command: java -jar target/storage-0.0.1-SNAPSHOT.jar
build:
context: .
dockerfile: Dockerfile
ports:
- "9090:9090"
environment:
- spring.datasource.url=jdbc:mysql://db:3306/db
- spring.datasource.username=user
- spring.datasource.password=password
- spring.redis.host=redis
- spring.redis.port=6379
- spring.redis.password=password
- spring.redis.timeout=60000
depends_on:
- db
- redis-server
db:
image: mysql
container_name: "mysqldb"
restart: always
environment:
MYSQL_DATABASE: "db"
MYSQL_USER: "user"
MYSQL_PASSWORD: "password"
MYSQL_ROOT_PASSWORD: "password"
ports:
- "3306:3306"
volumes:
- my-db:/var/lib/mysql
redis-server:
hostname: redis
container_name: "redisdb"
image: 'redis'
ports:
- "6379:6379"
volumes:
my-db: