移除 Dockerfile 中的 setcap 以修復 LXC sysctl 權限問題,並將內部 port 改為 8080
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Failing after 25s
ERP-Deploy-Production / deploy-production (push) Successful in 53s

This commit is contained in:
2026-02-23 15:58:52 +08:00
parent 59008eb59e
commit 6bb2afa3b7
3 changed files with 5 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ WORKDIR /var/www/html
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC ENV TZ=UTC
ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=8080"
ENV SUPERVISOR_PHP_USER="sail" ENV SUPERVISOR_PHP_USER="sail"
ENV PLAYWRIGHT_BROWSERS_PATH=0 ENV PLAYWRIGHT_BROWSERS_PATH=0
@@ -75,8 +75,6 @@ RUN apt-get update && apt-get upgrade -y \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.5
RUN userdel -r ubuntu RUN userdel -r ubuntu
RUN groupadd --force -g $WWWGROUP sail RUN groupadd --force -g $WWWGROUP sail
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail
@@ -87,6 +85,6 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY php.ini /etc/php/8.5/cli/conf.d/99-sail.ini COPY php.ini /etc/php/8.5/cli/conf.d/99-sail.ini
RUN chmod +x /usr/local/bin/start-container RUN chmod +x /usr/local/bin/start-container
EXPOSE 80/tcp EXPOSE 8080/tcp
ENTRYPOINT ["start-container"] ENTRYPOINT ["start-container"]

View File

@@ -4,7 +4,7 @@ server {
server_name _; server_name _;
location / { location / {
proxy_pass http://star-erp-laravel:80; proxy_pass http://star-erp-laravel:8080;
proxy_set_header Host star-erp.demo; proxy_set_header Host star-erp.demo;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -19,7 +19,7 @@ server {
server_name _; server_name _;
location / { location / {
proxy_pass http://star-erp-laravel:80; proxy_pass http://star-erp-laravel:8080;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

View File

@@ -12,7 +12,7 @@ server {
server_name erp.koori.tw erp.mamaiclub.com; server_name erp.koori.tw erp.mamaiclub.com;
location / { location / {
proxy_pass http://star-erp-laravel:80; proxy_pass http://star-erp-laravel:8080;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;