Skip to content

Commit 582a2ff

Browse files
committed
feat: 移动到分支目录
1 parent d52b17f commit 582a2ff

File tree

9 files changed

+253
-275
lines changed

9 files changed

+253
-275
lines changed

.github/workflows/docker-image.yml .github/workflows/latest.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docker Image CI
1+
name: Webox Latest Image CI
22

33
on:
44
push:
@@ -29,7 +29,7 @@ jobs:
2929
- name: Build and push
3030
uses: docker/build-push-action@v4
3131
with:
32-
context: .
32+
context: ./latest
3333
push: true
3434
platforms: linux/amd64,linux/arm64,linux/arm
3535
tags: rehiy/webox:latest

README-zh.md

+16-110
Original file line numberDiff line numberDiff line change
@@ -2,130 +2,36 @@
22

33
让我们从 `AlpineLinux` 重新起航 !
44

5-
*Webox*`web-box` 的缩写,意为建站盒子。这是一个自定义的 `LNMP` 集成化容器, 内置了以下常用模块 MariaDB、Nginx、PHP、Redis。
5+
*Webox*`web-box` 的缩写,意为建站盒子。这是一个自定义的 `LNMP` 集成化容器, 预安装了一些常用模块,如 MariaDB、Nginx、PHP、Redis。
66

7-
- mariadb 10.6.x
7+
## 使用说明
88

9-
- nginx 1.22.x
9+
由于不同分支预安装了不同的组件,请选择分支后查看详细说明
1010

11-
- php 8.1.x
11+
## 可用分支
1212

13-
- redis
13+
- [latest](https://github.com/rehiy/webox-docker/tree/master/latest): nginx + php8.1 + mariadb + redis
1414

15-
- redis 7.0.x
15+
- [edge](https://github.com/rehiy/webox-docker/tree/master/edge): nginx + php8.2 + mariadb + redis
1616

17-
# 可用分支
17+
- [edge-php7](https://github.com/rehiy/webox-docker/tree/master/edge-php7): nginx + php7.4 + mariadb + redis
1818

19-
- [latest](https://github.com/rehiy/webox-docker/tree/master): nginx + php8.1 + mariadb + redis
19+
- [nginx](https://github.com/rehiy/webox-docker/tree/master/nginx)
2020

21-
- [edge](https://github.com/rehiy/webox-docker/tree/edge): nginx + php8.2 + mariadb + redis
21+
- [nginx-geoip](https://github.com/rehiy/webox-docker/tree/master/nginx-geoip)
2222

23-
- [edge-php7](https://github.com/rehiy/webox-docker/tree/edge): nginx + php7.4 + mariadb + redis
23+
- [nginx-php8.2](https://github.com/rehiy/webox-docker/tree/master/nginx-php8.2)
2424

25-
- [nginx](https://github.com/rehiy/webox-docker/tree/nginx)
25+
- [nginx-php, nginx-php8, nginx-php8.1](https://github.com/rehiy/webox-docker/tree/master/nginx-php8.1)
2626

27-
- [nginx-geoip](https://github.com/rehiy/webox-docker/tree/nginx-geoip)
27+
- [nginx-php8.0](https://github.com/rehiy/webox-docker/tree/master/nginx-php8.0)
2828

29-
- [nginx-php8.2](https://github.com/rehiy/webox-docker/tree/nginx-php8.2)
29+
- [nginx-php7, nginx-php7.4](https://github.com/rehiy/webox-docker/tree/master/nginx-php7.4)
3030

31-
- [nginx-php, nginx-php8, nginx-php8.1](https://github.com/rehiy/webox-docker/tree/nginx-php8.1)
31+
- [nginx-php7.3](https://github.com/rehiy/webox-docker/tree/master/nginx-php7.3)
3232

33-
- [nginx-php8.0](https://github.com/rehiy/webox-docker/tree/nginx-php8.0)
33+
- [nginx-php5, nginx-php5.6](https://github.com/rehiy/webox-docker/tree/master/nginx-php5.6)
3434

35-
- [nginx-php7, nginx-php7.4](https://github.com/rehiy/webox-docker/tree/nginx-php7.4)
36-
37-
- [nginx-php7.3](https://github.com/rehiy/webox-docker/tree/nginx-php7.3)
38-
39-
- [nginx-php5, nginx-php5.6](https://github.com/rehiy/webox-docker/tree/nginx-php5.6)
40-
41-
# 快速启动
42-
43-
## 网站将监听下列端口 `docker-ip:80`
44-
45-
```shell
46-
docker run --name MYBOX -d -p 80:80 -p 443:443 \
47-
-v /MY/htdoc:/var/www/default \
48-
-v /MY/mysql:/var/lib/mysql \
49-
rehiy/webox
50-
```
51-
52-
## 把网站文件按照规则上传到指定目录
53-
54-
如果网站域名是 `www.example.org`,文件需要上传到目录 `/MY/htdoc/org.example.www/`
55-
56-
# 设置自启动组件
57-
58-
```shell
59-
docker run --name MYBOX -d -p 80:80 -p 443:443 \
60-
-v /MY/htdoc:/var/www/default \
61-
-v /MY/config:/var/config \
62-
-e 'WBX_APPS=nginx php81' \
63-
-e 'TZ=Asia/Shanghai' \
64-
rehiy/webox
65-
```
66-
67-
## 环境变量释义
68-
69-
- `WBX_APPS`, 设置需要启动的服务
70-
71-
- `TZ`, 设置容器时区
72-
73-
## 管理服务
74-
75-
```shell
76-
docker exec -it MYBOX wkit [start|stop|restart|reload]
77-
```
78-
79-
## 增加一些 PHP 扩展
80-
81-
```shell
82-
docker exec -it MYBOX apk add \
83-
php81-pcntl php81-posix php81-saop \
84-
php81-maxminddb php81-pecl-imagick
85-
```
86-
87-
## 自定义组件配置
88-
89-
请把配置文件放到目录 `/MY/config/*` ,这些文件将会覆盖容器内的配置目录 `/etc` ,并在重启容器后生效。
90-
91-
- 配置 mariadb
92-
93-
- /MY/config/mysql/conf.d/\*
94-
95-
- 配置 nginx
96-
97-
- /MY/config/nginx/host.d/\*
98-
99-
- 配置 php81
100-
101-
- /MY/config/php81/conf.d/\*
102-
103-
- 配置 redis
104-
105-
- /MY/config/redis/redis.conf
106-
107-
- 配置自启动脚本
108-
109-
- /MY/config/rc.local
110-
- /MY/config/local.d/\*
111-
- /MY/config/local.d/s3-prewkit
112-
- /MY/config/local.d/s5-wkit
113-
- /MY/config/local.d/s6-postwkit
114-
115-
# 重要提示
116-
117-
## 不要忘记修改数据库密码
118-
119-
```shell
120-
docker exec -it MYBOX mysqladmin -u root password abc345
121-
```
122-
123-
你可能还需要执行下列语句,删除危险账号。
124-
125-
```sql
126-
DROP USER 'mysql'@'localhost';
127-
```
128-
129-
# 更多问题
35+
## 更多问题
13036

13137
请查阅 <https://github.com/rehiy/webox-docker/issues>

README.md

+16-110
Original file line numberDiff line numberDiff line change
@@ -2,130 +2,36 @@
22

33
Re sail from alpine !
44

5-
*Webox* (`abbreviation for web-box`) is a customized LNMP server, which includes the following components: MariaDB, Nginx, PHP, Redis. And add some popular plug-ins.
5+
*Webox* is the abbreviation for `web-box`, which means building a website box. This is a custom `LNMP` integrated container that comes pre installed with some commonly used modules such as MariaDB, Nginx, PHP, and Redis.
66

7-
- mariadb 10.6.x
7+
## Instructions for use
88

9-
- nginx 1.22.x
9+
Due to different components pre installed on different branches, please select the branch and review the detailed instructions
1010

11-
- php 8.1.x
11+
## Supported Tags
1212

13-
- redis
13+
- [latest](https://github.com/rehiy/webox-docker/tree/master/latest): nginx + php8.1 + mariadb + redis
1414

15-
- redis 7.0.x
15+
- [edge](https://github.com/rehiy/webox-docker/tree/master/edge): nginx + php8.2 + mariadb + redis
1616

17-
# Supported Tags
17+
- [edge-php7](https://github.com/rehiy/webox-docker/tree/master/edge): nginx + php7.4 + mariadb + redis
1818

19-
- [latest](https://github.com/rehiy/webox-docker/tree/master): nginx + php8.1 + mariadb + redis
19+
- [nginx](https://github.com/rehiy/webox-docker/tree/master/nginx)
2020

21-
- [edge](https://github.com/rehiy/webox-docker/tree/edge): nginx + php8.2 + mariadb + redis
21+
- [nginx-geoip](https://github.com/rehiy/webox-docker/tree/master/nginx-geoip)
2222

23-
- [edge-php7](https://github.com/rehiy/webox-docker/tree/edge): nginx + php7.4 + mariadb + redis
23+
- [nginx-php8.2](https://github.com/rehiy/webox-docker/tree/master/nginx-php8.2)
2424

25-
- [nginx](https://github.com/rehiy/webox-docker/tree/nginx)
25+
- [nginx-php, nginx-php8, nginx-php8.1](https://github.com/rehiy/webox-docker/tree/master/nginx-php8.1)
2626

27-
- [nginx-geoip](https://github.com/rehiy/webox-docker/tree/nginx-geoip)
27+
- [nginx-php8.0](https://github.com/rehiy/webox-docker/tree/master/nginx-php8.0)
2828

29-
- [nginx-php8.2](https://github.com/rehiy/webox-docker/tree/nginx-php8.2)
29+
- [nginx-php7, nginx-php7.4](https://github.com/rehiy/webox-docker/tree/master/nginx-php7.4)
3030

31-
- [nginx-php, nginx-php8, nginx-php8.1](https://github.com/rehiy/webox-docker/tree/nginx-php8.1)
31+
- [nginx-php7.3](https://github.com/rehiy/webox-docker/tree/master/nginx-php7.3)
3232

33-
- [nginx-php8.0](https://github.com/rehiy/webox-docker/tree/nginx-php8.0)
33+
- [nginx-php5, nginx-php5.6](https://github.com/rehiy/webox-docker/tree/master/nginx-php5.6)
3434

35-
- [nginx-php7, nginx-php7.4](https://github.com/rehiy/webox-docker/tree/nginx-php7.4)
36-
37-
- [nginx-php7.3](https://github.com/rehiy/webox-docker/tree/nginx-php7.3)
38-
39-
- [nginx-php5, nginx-php5.6](https://github.com/rehiy/webox-docker/tree/nginx-php5.6)
40-
41-
# Simple Usage
42-
43-
## The nginx is listening on `docker-ip:80`
44-
45-
```shell
46-
docker run --name MYBOX -d -p 80:80 -p 443:443 \
47-
-v /MY/htdoc:/var/www/default \
48-
-v /MY/mysql:/var/lib/mysql \
49-
rehiy/webox
50-
```
51-
52-
## Put your files to host's webroot
53-
54-
If the domain is `www.example.org`, the webroot will be `/MY/htdoc/org.example.www/`.
55-
56-
# Manual Control Services
57-
58-
```shell
59-
docker run --name MYBOX -d -p 80:80 -p 443:443 \
60-
-v /MY/htdoc:/var/www/default \
61-
-v /MY/config:/var/config \
62-
-e 'WBX_APPS=nginx php81' \
63-
-e 'TZ=Asia/Shanghai' \
64-
rehiy/webox
65-
```
66-
67-
## ENV Variables
68-
69-
- `WBX_APPS`, Set up automatically started services
70-
71-
- `TZ`, Set the timezone
72-
73-
## Service management command
74-
75-
```shell
76-
docker exec -it MYBOX wkit [start|stop|restart|reload]
77-
```
78-
79-
## Add some PHP extension modules
80-
81-
```shell
82-
docker exec -it MYBOX apk add \
83-
php81-pcntl php81-posix php81-saop \
84-
php81-maxminddb php81-pecl-imagick
85-
```
86-
87-
## Configure the components you need
88-
89-
You can place additional config files in `/MY/config/*`, these files will be copied to `{MYBOX}/etc` and take effect on next restart.
90-
91-
- Configure mariadb
92-
93-
- /MY/config/mysql/conf.d/\*
94-
95-
- Configure virtual host
96-
97-
- /MY/config/nginx/host.d/\*
98-
99-
- Configure php81
100-
101-
- /MY/config/php81/conf.d/\*
102-
103-
- Configure redis
104-
105-
- /MY/config/redis/redis.conf
106-
107-
- Scripts in the following locations will be run when `MYBOX` started:
108-
109-
- /MY/config/rc.local
110-
- /MY/config/local.d/\*
111-
- /MY/config/local.d/s3-prewkit
112-
- /MY/config/local.d/s5-wkit
113-
- /MY/config/local.d/s6-postwkit
114-
115-
# Important Notice
116-
117-
## Don't forget to change mysql password
118-
119-
```shell
120-
docker exec -it MYBOX mysqladmin -u root password abc345
121-
```
122-
123-
You may also need to execute the following SQL statements.
124-
125-
```sql
126-
DROP USER 'mysql'@'localhost';
127-
```
128-
129-
# More Issues
35+
## More Issues
13036

13137
See <https://github.com/rehiy/webox-docker/issues> for more issues.

build.sh

-43
This file was deleted.

debug.sh

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
#!/bin/sh -ex
22
#
33

4-
if [ ! -x /usr/bin/dos2unix ]; then
5-
apt install -y dos2unix
6-
fi
7-
8-
find initfs/ -type f -exec dos2unix {} \;
9-
10-
#====================================================================#
4+
cd latest
115

126
docker build -t dev/webox .
137
sleep 3

Dockerfile latest/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ LABEL version="15.2.0" \
55

66
ENV WBX_APPS="mysql nginx php81 redis"
77

8-
ADD initfs /ifs
9-
RUN sh /ifs/deploy
8+
ADD deploy /tmp/deploy
9+
RUN sh /tmp/deploy
1010

1111
ENTRYPOINT ["/sbin/init"]
1212

0 commit comments

Comments
 (0)