Skip to content

Instantly share code, notes, and snippets.

@tunix
Last active March 17, 2017 18:02
Show Gist options
  • Save tunix/15a0a926b3a16c6acb8ffbd75351fbf0 to your computer and use it in GitHub Desktop.
Save tunix/15a0a926b3a16c6acb8ffbd75351fbf0 to your computer and use it in GitHub Desktop.
version: '3'
services:
api:
build: .
image: tunix/docker-compose-demo
ports:
- "8080"
links:
- db:demodb
command: ["/source/wait-for-it.sh", "demodb:3306", "--", "java", "-jar", "/app/demo.jar"]
db:
image: mysql
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_DATABASE=demo
- MYSQL_USER=user
- MYSQL_PASSWORD=test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment