官网部署-thinkcmf
- 部署文档
- 2024-06-27
- 801热度
- 0评论
1、框架thinkcmf,语言PHP,部署方式docker,服务器配置2c4G 50G
2、部署
#克隆代码
git clone https://gitee.com/thinkcmf/docker
#docker-compose.yml文件配置
version: "3"
services:
nginx:
image: nginx:alpine
restart: always
container_name: thinkcmf-nginx
ports:
- "80:80"
volumes:
- ./www/thinkcmf/:/var/www/html/:rw
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
networks:
- web
php-fpm:
image: thinkcmfpro/thinkcmf:latest
restart: always
container_name: thinkcmf-php-fpm
volumes:
- ./www/thinkcmf/:/var/www/html/:rw
- ./php/php.ini:/usr/local/etc/php/conf.d/php.ini
environment:
- DATABASE_HOSTNAME=mysql
- DATABASE_USERNAME=root
- DATABASE_PASSWORD=thinkcmf
- DATABASE_DATABASE=thinkcmf
networks:
- web
mysql:
image: mysql:latest
restart: always
container_name: thinkcmf-mysql
volumes:
- ./mysql/data/:/var/lib/mysql/
environment:
- MYSQL_ROOT_PASSWORD=thinkcmf
networks:
- web
ports:
- "3306:3306"
redis:
image: redis:alpine
restart: always
container_name: thinkcmf-redis
volumes:
- ./redis/data:/data
networks:
- web
adminer:
image: adminer
container_name: thinkcmf-mysql-manage
environment:
- ADMINER_DEFAULT_SERVER=mysql
- ADMINER_DEFAULT_USER=root
ports:
- "1000:8080"
depends_on:
- mysql
networks:
- web
restart: always
phpredisadmin:
image: erikdubbelboer/phpredisadmin
container_name: thinkcmf-redis-manage
environment:
- TZ=Asia/Shanghai
- REDIS_1_HOST=redis
- REDIS_1_PORT=6379
- ADMIN_USER=thinkcmf
- ADMIN_PASS=thinkcmf
ports:
- "2000:80"
depends_on:
- redis
networks:
- web
restart: always
networks:
web:
#启动服务
docker-compose up -d
3、访问ip:80
4、参考文档:开源web界面thinkcmf
