Skip to content

Instantly share code, notes, and snippets.

@jeonguk
Created January 15, 2018 12:32
Show Gist options
  • Save jeonguk/8efdbab7d4c706f87e18cdb77341e0e3 to your computer and use it in GitHub Desktop.
Save jeonguk/8efdbab7d4c706f87e18cdb77341e0e3 to your computer and use it in GitHub Desktop.
docker-compose.yml
version: '2.1'
services:
book-search-mysql:
image: mysql:5.7
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
container_name: book-search-mysql
healthcheck:
test: "exit 0"
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=jeonguk
- MYSQL_DATABASE=books
docker-book-search-service:
image: docker-book-search-service
container_name: docker-book-search-service
depends_on:
book-search-mysql:
condition: service_healthy
ports:
- 8080:8080
environment:
- DATABASE_HOST=book-search-mysql
- DATABASE_USER=root
- DATABASE_PASSWORD=jeonguk
- DATABASE_NAME=books
- DATABASE_PORT=3306
- TZ=Asia/Seoul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment