version: '3'

networks:
  likeadmin:
    driver: bridge

services:

  nginx:
    container_name: likeadmin-nginx
    image: registry.cn-guangzhou.aliyuncs.com/likeadmin/nginx:1.23.1
    restart: always
    depends_on:
      - "php"
    volumes:
      - ../server:/likeadmin_php/server
      - ./config/nginx/conf.d:/etc/nginx/conf.d
      - ./log/nginx/logs:/logs
    networks:
      - likeadmin
    ports:
      - "80:80"




  php:
    container_name: likeadmin-php
    image: registry.cn-guangzhou.aliyuncs.com/likeadmin/php:8.0.30.3-fpm  
    restart: always
    working_dir: /likeadmin_php/server
    volumes:
      - ../server:/likeadmin_php/server
    networks:
      - likeadmin
    ports:
      - "9000:9000"
    #user: "1000:1000"



  mysql:
    container_name: likeadmin-mysql
    image: registry.cn-guangzhou.aliyuncs.com/likeadmin/mysql:5.7.44 #X86架构
    #image: registry.cn-guangzhou.aliyuncs.com/likeadmin/mysql:5.7.29-amd64 #arm架构
    restart: always 
    environment:
      MYSQL_ROOT_PASSWORD: root
    volumes:
      - ./data/mysql5.7.29/lib:/var/lib/mysql
      - ./config/mysql/mysqld.cnf:/etc/mysql/my.cnf
    networks:
      - likeadmin
    ports:
      - "3306:3306"


  redis:
    container_name: likeadmin-redis
    image: registry.cn-guangzhou.aliyuncs.com/likeadmin/redis:7.4.0
    restart: always
    volumes:
      - ./data/redis:/data
    networks:
      - likeadmin
    ports:
      - "6379:6379"
