12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- version: '3'
- networks:
- kphcdr:
- driver: bridge
- services:
- nginx:
- container_name: ${ABBREVIATION}-nginx
- image: docker.io/nginx:1.23.0
- restart: always
- depends_on:
- - "php"
- volumes:
- - ./www:/www
- - ./config/nginx/conf.d:/etc/nginx/conf.d
- - ./logs/nginx/logs:/logs
- networks:
- - kphcdr
- ports:
- - "${NUMBER}080:80"
- php:
- #没有自定义要求就用镜像
- #build:
- # context: ./config/php
- # args:
- # TZ: "Asia/Shanghai"
- image: docker.io/kphcdr/kphcdr_php:latest
- restart: always
- container_name: ${ABBREVIATION}-php-fpm
- working_dir: /www/server
- volumes:
- - ./www:/www
- - ./config/php/php.ini:/usr/local/etc/php/php.ini
- networks:
- - kphcdr
- mysql:
- container_name: ${ABBREVIATION}-mysql
- image: docker.io/mysql:5.7.29 #X86架构
- restart: always
- platform: linux/amd64 #osx系统才需要
- ports:
- - "${NUMBER}3306:3306"
- volumes:
- - ./data/mysql5.7.29/lib:/var/lib/mysql
- - ./config/mysql/mysqld.cnf:/etc/mysql/my.cnf
- environment:
- MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
- TZ: "Asia/Shanghai"
- networks:
- - kphcdr
- redis:
- container_name: ${ABBREVIATION}-redis
- image: docker.io/redis:6.2.7
- restart: always
- volumes:
- - ./data/redis:/data
- networks:
- - kphcdr
- ports:
- - "${NUMBER}6379:6379"
|