version: '3'
services:
mysql:
image: mysql
environment:
MYSQL_DATABASE: 'semaphore'
MYSQL_ALLOW_EMPTY_PASSWORD: 'true'
hostname: mysql
ports:
- 6603:3306
volumes:
- /opt/data/mysql:/var/lib/mysql
networks:
- semaphore_mysql
semaphore:
image: dsmorse/semaphore-docker:latest
expose:
- 3000
ports:
- 8500:3000
links:
- mysql:mysql
networks:
- semaphore_mysql
networks:
semaphore_mysql:
driver: bridge
我正在尝试使用docker-compose安装信号灯。错误是信号量无法连接到数据库。
错误:无法连接到数据库! semaphore_1 |拨打tcp:3306:getsockopt:连接被拒绝