效果
安装
1.创建目录
mkdir /opt/typecho/usr
cd /opt/typecho
2.编写配置文件
vim docker-compose.yml
内容如下
version: '3'
services:
typecho:
image: joyqi/typecho:nightly-php7.4-apache
container_name: typecho
restart: always
environment:
- TYPECHO_SITE_URL=http://192.168.168.111:10024
- TYPECHO_DB_HOST=mysql
- TYPECHO_DB_DATABASE=typecho
- TYPECHO_DB_USER=root
- TYPECHO_DB_PASSWORD=123456
ports:
- 10024:80
volumes:
- /opt/typecho/usr:/app/usr
networks:
- ilaozhu_net
networks:
ilaozhu_net:
driver: bridge
name: ilaozhu_net
external: true
3.创建网络
docker network create ilaozhu_net
4.启动
docker compose up -d
使用
1.配置