diff --git a/eeos/docker-compose.yml b/eeos/docker-compose.yml index 6ba36c47..7c1a6c2e 100644 --- a/eeos/docker-compose.yml +++ b/eeos/docker-compose.yml @@ -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" @@ -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: . @@ -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: diff --git a/eeos/resources/local-develop-environment/docker-compose.yml b/eeos/resources/local-develop-environment/docker-compose.yml index c107468a..8214c6f2 100644 --- a/eeos/resources/local-develop-environment/docker-compose.yml +++ b/eeos/resources/local-develop-environment/docker-compose.yml @@ -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: @@ -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: @@ -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" \ No newline at end of file