sshportal/examples/mysql/docker-compose.yml

33 lines
742 B
YAML
Raw Normal View History

2017-11-10 22:41:06 +08:00
version: '2.1'
services:
sshportal:
build: ../..
restart: unless-stopped
2018-11-19 19:56:24 +08:00
environment:
SSHPORTAL_DB_DRIVER: mysql
SSHPORTAL_DATABASE_URL: "root:root@tcp(mysql:3306)/db?charset=utf8&parseTime=true&loc=Local"
SSHPORTAL_DEBUG: 1
2017-11-10 22:41:06 +08:00
depends_on:
mysql:
condition: service_healthy
links:
- mysql
2018-11-19 19:56:24 +08:00
command: server
2017-11-10 22:41:06 +08:00
ports:
- 2222:2222
mysql:
image: mysql:latest
ports:
- 3306
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=db
restart: unless-stopped
command: --log-error-verbosity=3
healthcheck:
test: ["CMD-SHELL", "echo SELECT 1 | mysql -h127.0.0.1 -uroot -proot"]
interval: 5s
timeout: 5s
retries: 5