Files
chuanqi-server/docker-compose.yml
aixianling c703f3a544 build:为 MySQL 容器添加启动脚本
- 在 MySQL 容器中添加 /data/run.sh 脚本作为启动命令
- 该修改使容器在启动时执行自定义脚本,可能包含初始化数据库或其他操作
2024-12-13 17:16:25 +08:00

19 lines
419 B
YAML

version: '3.8'
services:
server:
image: centos:centos7.9.2009
container_name: chuanqi-server
stdin_open: true
volumes:
- ./server:/data/server
- ./run.sh:/data/run.sh
- ./stop.sh:/data/stop.sh
- ./wch:/etc/yum/wch
- /usr/lib64/mysql:/usr/lib64/mysql
network_mode: "host"
restart: unless-stopped
command: /data/run.sh
environment:
TZ: Asia/Shanghai