mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-02-02 07:28:13 -05:00
Compare commits
7 Commits
e22dfaf445
...
12536b34aa
Author | SHA1 | Date | |
---|---|---|---|
|
12536b34aa | ||
|
b35705731d | ||
|
69c374ee17 | ||
|
bb3474f4fa | ||
|
8dc95f6b7a | ||
|
0df00c6596 | ||
|
30f55066c3 |
@ -1 +0,0 @@
|
||||
* * * * * php /www/artisan schedule:run >> /dev/null 2>&1
|
@ -1,40 +0,0 @@
|
||||
server {
|
||||
listen 7001 default_server;
|
||||
|
||||
root /www/public/;
|
||||
index index.html index.htm;
|
||||
|
||||
server_name _;
|
||||
|
||||
# 开启 brotli 压缩
|
||||
brotli on;
|
||||
brotli_static on;
|
||||
brotli_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
# 开启 gzip 压缩
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
location ~* \.(jpg|jpeg|png|gif|js|css|svg|woff2|woff|ttf|eot|wasm|json|ico)$ {
|
||||
# 这里将.jpg、.jpeg、.png、.gif、.js和.css文件直接返回给客户端
|
||||
}
|
||||
|
||||
location ~ .* {
|
||||
proxy_pass http://127.0.0.1:7010;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-PORT $remote_port;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Scheme $scheme;
|
||||
proxy_set_header Server-Protocol $server_protocol;
|
||||
proxy_set_header Server-Name $server_name;
|
||||
proxy_set_header Server-Addr $server_addr;
|
||||
proxy_set_header Server-Port $server_port;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/dev/null
|
||||
logfile_maxbytes=0
|
||||
pidfile=/tmp/supervisord.pid
|
||||
|
||||
[program:nginx]
|
||||
command=nginx -g 'daemon off;'
|
||||
user=root
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startretries=10
|
||||
|
||||
[program:cron]
|
||||
command=crond -f -l 8
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startretries=10
|
||||
|
||||
; [program:laravels]
|
||||
; command=php bin/laravels start
|
||||
; directory=/www
|
||||
; user=www-data
|
||||
; numprocs=1
|
||||
; stdout_logfile=/dev/stdout
|
||||
; stdout_logfile_maxbytes=0
|
||||
; stderr_logfile=/dev/stderr
|
||||
; stderr_logfile_maxbytes=0
|
||||
; autostart=true
|
||||
; autorestart=true
|
||||
; startretries=3
|
||||
|
||||
[program:adapterman]
|
||||
command=php -c php.ini webman.php start
|
||||
directory=/www
|
||||
user=root
|
||||
numprocs=1
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startretries=3
|
||||
|
||||
[program:xboard-queue]
|
||||
command=php artisan horizon
|
||||
directory=/www
|
||||
user=root
|
||||
stdout_logfile=/www/storage/logs/queue.log
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/www/storage/logs/queue_error.log
|
||||
stderr_logfile_maxbytes=0
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startretries=10
|
||||
numprocs=1
|
@ -1,5 +0,0 @@
|
||||
FROM redis:7-alpine
|
||||
|
||||
RUN mkdir -p /run/redis-socket && chmod 777 /run/redis-socket
|
||||
COPY ./redis.conf /etc/redis.conf
|
||||
CMD ["redis-server", "/etc/redis.conf"]
|
@ -1,3 +0,0 @@
|
||||
unixsocket /run/redis-socket/redis.sock
|
||||
unixsocketperm 777
|
||||
port 0
|
42
compose.yaml
Normal file
42
compose.yaml
Normal file
@ -0,0 +1,42 @@
|
||||
services:
|
||||
web:
|
||||
image: ghcr.io/cedar2025/xboard:new
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ${PWD}/.env
|
||||
target: /www/.env
|
||||
- ./.docker/.data/:/www/.docker/.data
|
||||
environment:
|
||||
- docker=true
|
||||
depends_on:
|
||||
- redis
|
||||
# network_mode: host
|
||||
command: php artisan octane:start --server="swoole" --port=7001 --host=0.0.0.0
|
||||
restart: on-failure
|
||||
ports:
|
||||
- 7001:7001
|
||||
horizon:
|
||||
image: ghcr.io/cedar2025/xboard:new
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ${PWD}/.env
|
||||
target: /www/.env
|
||||
- ./.docker/.data/:/www/.docker/.data
|
||||
restart: on-failure
|
||||
# network_mode: host
|
||||
command: php artisan horizon
|
||||
depends_on:
|
||||
- redis
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
command: redis-server --appendonly yes --appendfsync everysec
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./.docker/.data/:/www/.docker/.data
|
||||
sysctls:
|
||||
net.core.somaxconn: 1024
|
||||
ulimits:
|
||||
nproc: 65535
|
||||
nofile:
|
||||
soft: 20000
|
||||
hard: 40000
|
@ -1,24 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
xboard:
|
||||
image: ghcr.io/cedar2025/xboard:latest
|
||||
volumes:
|
||||
- ./.env:/www/.env
|
||||
- ./.docker/.data/:/www/.docker/.data/
|
||||
# - ./config/v2board.php:/www/config/v2board.php
|
||||
- redis-socket:/run/redis-socket # 挂载socket
|
||||
environment:
|
||||
- docker=true #用于给安装脚本判断是否为docker环境
|
||||
depends_on:
|
||||
- redis
|
||||
network_mode: host
|
||||
restart: always
|
||||
redis:
|
||||
build:
|
||||
context: .docker/services/redis
|
||||
restart: always
|
||||
volumes:
|
||||
- ./.docker/.data/redis:/data/ # 挂载redis持久化数据
|
||||
- redis-socket:/run/redis-socket # 挂载socket
|
||||
volumes:
|
||||
redis-socket:
|
Loading…
Reference in New Issue
Block a user