mirror of
https://github.com/moul/sshportal.git
synced 2024-11-15 12:46:17 +08:00
33 lines
No EOL
742 B
YAML
33 lines
No EOL
742 B
YAML
version: '2.1'
|
|
|
|
services:
|
|
sshportal:
|
|
build: ../..
|
|
restart: unless-stopped
|
|
environment:
|
|
SSHPORTAL_DB_DRIVER: mysql
|
|
SSHPORTAL_DATABASE_URL: "root:root@tcp(mysql:3306)/db?charset=utf8&parseTime=true&loc=Local"
|
|
SSHPORTAL_DEBUG: 1
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
links:
|
|
- mysql
|
|
command: server
|
|
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 |