Skip to content

Commit

Permalink
feat : docker-compose에 redis 추가 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
kssumin committed Mar 12, 2024
1 parent a9f8e6e commit 6e48633
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
14 changes: 12 additions & 2 deletions eeos/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
environment:
- MYSQL_DATABASE=eeos
- MYSQL_ROOT_HOST=%
- MYSQL_ROOT_PASSWORD=root
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
command: [ "--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci", "--skip-character-set-client-handshake", "--lower_case_table_names=1", "--max_connections=2048", "--wait_timeout=3600" ]
ports:
- "13306:3306"
Expand All @@ -25,6 +25,15 @@ services:
- eeos-network
depends_on:
- mysql
redis:
container_name: eeos-redis
image: redis:latest
ports:
- "16379:6379"
environment:
- REDIS_PASSWORD=${DB_PASSWORD}
networks:
- eeos-network
backend:
build:
context: .
Expand All @@ -35,12 +44,13 @@ services:
depends_on:
- mysql
- flyway
- redis
restart: always
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://eeos-mysql:3306/eeos?useSSL=false&serverTimezone=Asia/Seoul&useLegacyDatetimeCode=false&allowPublicKeyRetrieval=true
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: root
SPRING_PROFILES_ACTIVE: dev
SPRING_PROFILES_ACTIVE: ${PROFILE}
networks: #사용할 네트워크 지정
- eeos-network
networks:
Expand Down
18 changes: 9 additions & 9 deletions eeos/resources/local-develop-environment/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: '3.1'
services:
overflow-mysql:
eeos-local-mysql:
container_name: eeos-mysql8
image: mysql/mysql-server:8.0.27
environment:
Expand All @@ -12,8 +12,14 @@ services:
- "13308:3306"
volumes:
- ./mysql-init.d/:/docker-entrypoint-initdb.d

overflow-adminer: # mysql web admin
eeos-local-redis:
container_name: eeos-redis
image: redis:latest
ports:
- "16379:6379"
environment:
- REDIS_PASSWORD=root
eeos-local-adminer: # mysql web admin
container_name: eeos-adminer
image: adminer:4
ports:
Expand All @@ -22,9 +28,3 @@ services:
- ADMINER_DEFAULT_SERVER=overflow-mysql8
- ADMINER_DESIGN=nette
- ADMINER_PLUGINS=tables-filter tinymce

overflow-redis: # Redis
container_name: eeos-redis
image: redis:latest
ports:
- "16379:6379"

0 comments on commit 6e48633

Please sign in to comment.