docker-compose 使用例項

遇见、發表於2024-08-09

cat docker-compose.yaml <<EOF

version: '3'
services:
# xiaomusic xiaomusic: image: my
/xiaomusic container_name: xiaomusic restart: unless-stopped ports: - 8090:8090 volumes: - /mnt/music:/app/music - /home/music/setting.json:/app/conf/setting.json environment: XIAOMUSIC_HOSTNAME: '192.168.0.96' XIAOMUSIC_CONF_PATH: '/app/conf'
# mi-gpt migpt: image: my/migpt container_name: migpt restart: unless-stopped volumes: - /home/migpt/.migpt.js:/app/.migpt.js environment: OPENAI_MODEL: 'qwen1.5-0.5b-chat'
OPENAI_BASE_URL: 'https://xxx'

執行 docker-compose up 建立並啟動例項

在後臺執行該服務可以加上 -d 引數

docker-compose up -d

  

docker-compose up

相關文章