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