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 error #145

Open
homuraLan opened this issue Mar 23, 2023 · 2 comments
Open

docker error #145

homuraLan opened this issue Mar 23, 2023 · 2 comments

Comments

@homuraLan
Copy link

image

I confirm that it has connected to the specified database of MySQL, but this error still occurs

@homuraLan
Copy link
Author

i use docker-compose.yaml

@homuraLan
Copy link
Author

version: '3'

services:
  lychee_db:
    container_name: lychee_db
    image: mariadb:10
    environment:
      - MYSQL_ROOT_PASSWORD=a1234
      - MYSQL_DATABASE=lychee
      - MYSQL_USER=lychee
      - MYSQL_PASSWORD=a1234
    expose: 
      - 3306
    volumes:
      - "D:/docker/lychee/db:/var/lib/mysql"
    networks:
      lychee_network:
        ipv4_address: 172.15.238.3
    restart: unless-stopped

  lychee:
    image: lycheeorg/lychee:v4.5.3
    container_name: lychee
    ports:
      - 90:80
    volumes:
      - "D:/docker/lychee/conf:/conf"
      - "E:/lychee-data:/uploads"
      - "D:/docker/lychee/sym:/sym"
    networks:
      lychee_network:
        ipv4_address: 172.15.238.4
    # networks:
        # mariadb_default:  
    environment:
      - TZ=Asia/Shanghai
      - DB_CONNECTION=mysql
      - DB_HOST=172.15.238.3
      - DB_PORT=3306
      - DB_DATABASE=lychee
      - DB_USERNAME=lychee
      - DB_PASSWORD=a1234
      - REDIS_HOST=192.168.0.29
      - REDIS_PASSWORD=a1234
      - REDIS_PORT=6379
    restart: unless-stopped
    depends_on:
      - lychee_db

networks:
  lychee_network:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.15.238.0/24
          gateway: 172.15.238.1
          
# networks:
  # mariadb_default:
    # external: true

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