Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议修改docker compose配置 #3

Open
en0th opened this issue Sep 5, 2023 · 0 comments
Open

建议修改docker compose配置 #3

en0th opened this issue Sep 5, 2023 · 0 comments

Comments

@en0th
Copy link

en0th commented Sep 5, 2023

不是简单的使用路由模式 host,而是通过映射端口的方式带出。其中数据库不建立网卡,仅通过容器进行通信。

version: "3.2"
services:
  swallow:
    image: daxia/swallow:latest
    container_name: swallow_web
    network_mode: "bridge"
    environment:
      - TZ=Asia/Shanghai
    restart: always
    ports:
      - "18000:1890"
    volumes:
      - type: bind
        source: "./"
        target: "/root/code"
  mysql:
    image: daxia/swallow:mysql57
    container_name: swallow_mysql
    network_mode: "container:swallow_web"
    environment:
      - MYSQL_ROOT_PASSWORD=dolphin123!
      - TZ=Asia/Shanghai
    restart: always
    command:
      --wait_timeout=31536000
      --interactive_timeout=31536000
      --max_connections=1000
      --default-authentication-plugin=mysql_native_password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant