[2025-05-30] 添加一些 docker compose 配置
All checks were successful
Publish to Confluence / confluence (push) Successful in 37s

This commit is contained in:
liuxiaohua 2025-05-30 18:33:26 +08:00
parent e3703d69f3
commit c75caed897
8 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,18 @@
services:
elasticsearch:
image: elasticsearch:7.16.3
container_name: elasticsearch
environment:
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- xpack.security.enabled=false
ports:
- "9200:9200"
- "9300:9300"
volumes:
- es_data_16:/usr/share/elasticsearch/data
- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
restart: always
volumes:
es_data_16:

View File

@ -0,0 +1 @@
network.host: 0.0.0.0

View File

@ -0,0 +1,15 @@
services:
minio:
image: minio/minio:RELEASE.2025-02-03T21-03-04Z
container_name: minio
ports:
- "9000:9000" # API 端口
- "9001:9001" # 控制台端口
volumes:
- ./data:/data # 持久化存储数据
- ./config:/root/.minio # 配置文件(可选)
environment:
MINIO_ROOT_USER: admin # 管理账号(自行修改)
MINIO_ROOT_PASSWORD: Admin123. # 管理密码(自行修改)
command: server --console-address :9001 /data # 指定控制台端口和数据目录
restart: unless-stopped

View File

@ -0,0 +1,15 @@
services:
mysql:
image: mysql:latest
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: Admin123.
# MYSQL_DATABASE: roncoo
MYSQL_USER: admin
MYSQL_PASSWORD: Admin123.
ports:
- "3306:3306"
volumes:
- ./data:/var/lib/mysql
- ./config/mysql.cnf:/etc/my.cnf
restart: always

View File

@ -0,0 +1,34 @@
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/9.2/en/server-configuration-defaults.html
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
host-cache-size=0
skip-name-resolve
datadir=/var/lib/mysql
socket=/var/run/mysqld/mysqld.sock
secure-file-priv=/var/lib/mysql-files
user=mysql
lower_case_table_names=1
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
pid-file=/var/run/mysqld/mysqld.pid
[client]
socket=/var/run/mysqld/mysqld.sock
!includedir /etc/mysql/conf.d/

View File

@ -0,0 +1,7 @@
services:
postgres:
image: postgres:16-alpine
env_file: postgresql.env
restart: always
volumes:
- ./pgdata:/var/lib/postgresql/data

View File

@ -0,0 +1 @@
POSTGRES_PASSWORD=Admin123.

View File

@ -0,0 +1,12 @@
services:
redis:
image: redis:latest
container_name: redis
restart: always
ports:
- '6379:6379'
volumes:
- ./data:/data
- ./redis.conf:/usr/local/etc/redis/redis.conf
- ./logs:/logs
command: redis-server /usr/local/etc/redis/redis.conf