This is an automated email from the ASF dual-hosted git repository.

petko pushed a commit to branch migration-translation-opengrok
in repository https://gitbox.apache.org/repos/asf/openoffice-devtools.git

commit c13db9b5d9c19199071f00cfcefdd82100b45015
Author: Peter Kovacs <[email protected]>
AuthorDate: Mon Aug 18 19:22:29 2025 +0200

    mysql first config
---
 images/mysql/docker-compose.yaml | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/images/mysql/docker-compose.yaml b/images/mysql/docker-compose.yaml
new file mode 100644
index 0000000..e282879
--- /dev/null
+++ b/images/mysql/docker-compose.yaml
@@ -0,0 +1,27 @@
+services:
+  db:
+    image: mysql:8.0 # You can choose other versions like mysql:5.7, 
mysql:8.0, etc.
+    container_name: my_mysql_db
+    environment:
+      MYSQL_ROOT_PASSWORD: ${mysql_root_password} # IMPORTANT: Change this!
+      MYSQL_DATABASE: my_database_name              # Optional: Database to 
create on startup
+      MYSQL_USER: my_user                           # Optional: User to create
+      MYSQL_PASSWORD: my_user_password              # Optional: Password for 
the new user
+    ports:
+      - "3306:3306" # Maps host port 3306 to container port 3306
+    volumes:
+      # This is CRITICAL for data persistence!
+      # Data will be stored in a Docker named volume called 'mysql_data'.
+      - mysql_data:/var/lib/mysql
+      # Optional: Mount a directory of .sql files for initial setup
+      # These will be executed when the container starts for the first time
+      - ./db_init:/docker-entrypoint-initdb.d
+    restart: unless-stopped # Always restart the container if it stops
+    healthcheck: # Recommended for production to ensure database is truly ready
+      test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", 
"-p${MYSQL_ROOT_PASSWORD}"]
+      timeout: 10s
+      retries: 5
+      interval: 30s
+
+volumes:
+  mysql_data: # Define the named volume
\ No newline at end of file

Reply via email to