首页 > 其他分享 >Database

Database

时间:2022-11-30 02:12:06浏览次数:31  
标签:compose Database cat Usage docker yml

Database

Usage

cat > docker-compose.yml <<-'EOF'
# https://hub.docker.com/_/mysql
# https://hub.docker.com/_/postgres
# Port: 3306
version: "3"

services:
  mysql:
    image: mysql:5.7
    environment:
      - MYSQL_ROOT_PASSWORD=password
      - MYSQL_USER=mysql
      - MYSQL_PASSWORD=password
    network_mode: host
    restart: always
    volumes:
      - ./mysql/mysql/:/var/lib/mysql/

  postgres:
    image: postgres:14
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
    network_mode: host
    restart: always

EOF

标签:compose,Database,cat,Usage,docker,yml
From: https://www.cnblogs.com/newhappy98/p/16937260.html

相关文章