-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (61 loc) · 1.54 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
version: '3.8'
services:
mysql:
image: mysql:latest
container_name: book-mile-mysql
env_file:
- .env
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
ports:
- "3307:3306"
volumes:
- mysql_data:/var/lib/mysql
networks:
- app-network
redis:
image: redis:latest
container_name: book-mile-redis
ports:
- "6379:6379"
command: redis-server --appendonly yes # 데이터 영구 저장 옵션
volumes:
- redis_data:/data
networks:
- app-network
application:
container_name: book-mile-app
build:
context: ./
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
- mysql
- redis
environment:
SPRING_DATASOURCE_URL: ${SPRING_DATASOURCE_URL}
SPRING_DATASOURCE_PASSWORD: ${MYSQL_ROOT_PASSWORD}
SPRING_DATASOURCE_USERNAME: root
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
AWS_ACCESS_KEY: ${AWS_ACCESS_KEY}
AWS_SECRET_KEY: ${AWS_SECRET_KEY}
AWS_BUCKET_FOLDER: ${AWS_BUCKET_FOLDER}
AWS_BUCKET_PROFILE_FOLDER: ${AWS_BUCKET_PROFILE_FOLDER}
AWS_BUCKET_MAIN_PROFILE: ${AWS_BUCKET_MAIN_PROFILE}
command: [ "java", "-jar", "/app.jar" ]
networks:
- app-network
volumes:
mysql_data:
redis_data:
networks:
app-network:
name: app-network
driver: bridge