dosubot[bot] commented on issue #7864: URL: https://github.com/apache/incubator-devlake/issues/7864#issuecomment-2273993329
<!-- Answer --> To connect your MySQL RDS instance to DevLake using your `docker-compose.yml` file, you can follow these steps: 1. **Comment out the 'mysql' service in `docker-compose.yml`:** ```yaml # mysql: # image: mysql:8 # volumes: # - mysql-storage:/var/lib/mysql # restart: always # ports: # - 3306:3306 # environment: # MYSQL_ROOT_PASSWORD: admin # MYSQL_DATABASE: lake # MYSQL_USER: merico # MYSQL_PASSWORD: merico # TZ: UTC # command: --character-set-server=utf8mb4 # --collation-server=utf8mb4_bin # --skip-log-bin ``` 2. **Comment out the 'mysql' volume in `docker-compose.yml`:** ```yaml #volumes: # mysql-storage: ``` 3. **Comment out the 'depends_on mysql' part in the `grafana` and `devlake` services:** ```yaml grafana: image: devlake.docker.scarf.sh/apache/devlake-dashboard:v1.0.0 ports: - 3002:3000 volumes: - grafana-storage:/var/lib/grafana environment: GF_SERVER_ROOT_URL: "http://localhost:4000/grafana" GF_USERS_DEFAULT_THEME: "light" MYSQL_URL: your-rds-endpoint:3306 MYSQL_DATABASE: your-database-name MYSQL_USER: your-username MYSQL_PASSWORD: your-password TZ: UTC restart: always #depends_on: # - mysql devlake: image: devlake.docker.scarf.sh/apache/devlake:v1.0.0 ports: - 8080:8080 restart: always volumes: - devlake-log:/app/logs env_file: - ./.env environment: LOGGING_DIR: /app/logs TZ: UTC #depends_on: # - mysql ``` 4. **Set `DB_URL` to your own DB_URL in `.env`:** ```bash DB_URL="mysql://your-username:your-password@your-rds-endpoint:3306/your-database-name?charset=utf8mb4&parseTime=True" # Don't forget to create db named `lake` in your own db, and set character-set-server=utf8mb4, collation-server=utf8mb4_bin as below # character-set-server=utf8mb4 # collation-server=utf8mb4_bin ``` 5. **Final step: Run `docker compose up -d` to launch DevLake.** This configuration will allow DevLake to use your MySQL RDS instance as its database <sup>[[1]](https://github.com/apache/incubator-devlake-website/blob/main/docs/GettingStarted/DockerComposeSetup.md)</sup><sup>[[2]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.15/GettingStarted/DockerComposeSetup.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org