mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-03 18:40:52 +08:00
- Implement Workerman-based `xboard:ws-server` for real-time node synchronization. - Support custom routes, outbounds, and certificate configurations via JSON. - Optimize scheduled tasks with `lazyById` to minimize memory footprint. - Enhance reactivity using Observers for `Plan`, `Server`, and `ServerRoute`. - Expand protocol support for `httpupgrade`, `h2`, and `mieru`.
47 lines
1.6 KiB
Docker
47 lines
1.6 KiB
Docker
FROM phpswoole/swoole:php8.2-alpine
|
|
|
|
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
|
|
|
|
# Install PHP extensions one by one with lower optimization level for ARM64 compatibility
|
|
RUN CFLAGS="-O0" install-php-extensions pcntl && \
|
|
CFLAGS="-O0 -g0" install-php-extensions bcmath && \
|
|
install-php-extensions zip && \
|
|
install-php-extensions redis && \
|
|
apk --no-cache add shadow sqlite mysql-client mysql-dev mariadb-connector-c git patch supervisor redis && \
|
|
addgroup -S -g 1000 www && adduser -S -G www -u 1000 www && \
|
|
(getent group redis || addgroup -S redis) && \
|
|
(getent passwd redis || adduser -S -G redis -H -h /data redis)
|
|
|
|
WORKDIR /www
|
|
|
|
COPY .docker /
|
|
|
|
# Add build arguments
|
|
ARG CACHEBUST
|
|
ARG REPO_URL
|
|
ARG BRANCH_NAME
|
|
|
|
RUN echo "Attempting to clone branch: ${BRANCH_NAME} from ${REPO_URL} with CACHEBUST: ${CACHEBUST}" && \
|
|
rm -rf ./* && \
|
|
rm -rf .git && \
|
|
git config --global --add safe.directory /www && \
|
|
git clone --depth 1 --branch ${BRANCH_NAME} ${REPO_URL} . && \
|
|
git submodule update --init --recursive --force
|
|
|
|
COPY .docker/supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
RUN composer install --no-cache --no-dev \
|
|
&& php artisan storage:link \
|
|
&& cp -r plugins/ /opt/default-plugins/ \
|
|
&& chown -R www:www /www \
|
|
&& chmod -R 775 /www \
|
|
&& mkdir -p /data \
|
|
&& chown redis:redis /data
|
|
|
|
ENV ENABLE_WEB=true \
|
|
ENABLE_HORIZON=true \
|
|
ENABLE_REDIS=false \
|
|
ENV_ENABLE_WS_SERVER=false
|
|
|
|
EXPOSE 7001
|
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] |