version: '3.1' services: yourls: image: yourls ports: - "8080:80" environment: - YOURLS_DB_HOST=mysql - YOURLS_DB_USER=root - YOURLS_DB_PASS=root - YOURLS_DB_NAME=yourls - YOURLS_USER=admin - YOURLS_PASS=admin - YOURLS_SITE=https://yourls.easypi.pro depends_on: - mysql restart: always mysql: image: mysql:5.7 volumes: - ./data:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=root - MYSQL_DATABASE=yourls restart: always