v0.0.2 修正Nginx 問題 2050610
This commit is contained in:
parent
088c9183f2
commit
ea848217fd
@ -1,11 +1,9 @@
|
|||||||
# Project
|
# Project
|
||||||
APP_NAME=ktvcentral
|
APP_NAME=ktvcentral
|
||||||
APP_DOMAIN=zqd.superstar.dnsnet.cc
|
APP_DOMAIN=zqd.superstar.dnsnet.cc
|
||||||
APP_PORT=8080
|
APP_URL=http://zqd.superstar.dnsnet.cc
|
||||||
APP_URL=http://${APP_DOMAIN}:${APP_PORT}
|
|
||||||
|
|
||||||
REPO_URL=http://47.251.18.130:3000/Leecheng/KTVCentral.git
|
REPO_URL=http://47.251.18.130:3000/Leecheng/KTVCentral.git
|
||||||
REPO_BRANCH=main
|
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
DB_DATABASE=KaraokeKingpin
|
DB_DATABASE=KaraokeKingpin
|
||||||
|
@ -3,6 +3,7 @@ FROM php:8.3-fpm
|
|||||||
# ---- system & PHP extensions -------------------------------------------------
|
# ---- system & PHP extensions -------------------------------------------------
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
nginx \
|
nginx \
|
||||||
|
gettext \
|
||||||
git unzip zip curl ca-certificates supervisor cron nano \
|
git unzip zip curl ca-certificates supervisor cron nano \
|
||||||
libpng-dev libjpeg62-turbo-dev libfreetype6-dev \
|
libpng-dev libjpeg62-turbo-dev libfreetype6-dev \
|
||||||
libonig-dev libxml2-dev libzip-dev libpq-dev libicu-dev libxslt-dev \
|
libonig-dev libxml2-dev libzip-dev libpq-dev libicu-dev libxslt-dev \
|
||||||
@ -25,7 +26,7 @@ COPY docker/php/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
|||||||
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
COPY docker/entrypoint.sh /entrypoint.sh
|
COPY docker/entrypoint.sh /entrypoint.sh
|
||||||
COPY docker/entrypoint.git.sh /entrypoint.git.sh
|
COPY docker/entrypoint.git.sh /entrypoint.git.sh
|
||||||
COPY docker/nginx/default.conf.template /etc/nginx/conf.d/default.conf
|
COPY docker/nginx/default.conf.template /etc/nginx/templates/default.conf.template
|
||||||
|
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
|
|
||||||
|
@ -28,14 +28,14 @@ services:
|
|||||||
- ./data/logs/php:/var/www/logs
|
- ./data/logs/php:/var/www/logs
|
||||||
- ./data/nginx/conf.d/:/etc/nginx/conf.d/
|
- ./data/nginx/conf.d/:/etc/nginx/conf.d/
|
||||||
- ./data/logs/nginx/:/var/log/nginx
|
- ./data/logs/nginx/:/var/log/nginx
|
||||||
- ./docker/nginx/default.conf.template:/etc/nginx/conf.d/default.conf
|
- ./docker/nginx/default.conf.template:/etc/nginx/templates/default.conf.template
|
||||||
ports:
|
ports:
|
||||||
- "${APP_PORT}:80"
|
- "${APP_PORT:-80}:${APP_PORT:-80}"
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
environment:
|
environment:
|
||||||
REPO_URL: ${REPO_URL}
|
REPO_URL: ${REPO_URL}
|
||||||
BRANCH: ${REPO_BRANCH}
|
BRANCH: ${REPO_BRANCH:-main}
|
||||||
APP_NAME: ${APP_NAME}
|
APP_NAME: ${APP_NAME}
|
||||||
APP_URL: ${APP_URL}
|
APP_URL: ${APP_URL}
|
||||||
DB_HOST: mariadb
|
DB_HOST: mariadb
|
||||||
@ -44,7 +44,7 @@ services:
|
|||||||
DB_USERNAME: ${DB_USERNAME}
|
DB_USERNAME: ${DB_USERNAME}
|
||||||
DB_PASSWORD: ${DB_PASSWORD}
|
DB_PASSWORD: ${DB_PASSWORD}
|
||||||
NGINX_HOST: ${APP_DOMAIN}
|
NGINX_HOST: ${APP_DOMAIN}
|
||||||
NGINX_PORT: 80
|
NGINX_PORT: ${APP_PORT:-80}
|
||||||
networks:
|
networks:
|
||||||
- app_network
|
- app_network
|
||||||
|
|
||||||
|
@ -40,4 +40,5 @@ chmod -R 775 storage bootstrap/cache
|
|||||||
mkdir -p /var/www/logs
|
mkdir -p /var/www/logs
|
||||||
supervisord -c /etc/supervisor/conf.d/supervisord.conf &
|
supervisord -c /etc/supervisor/conf.d/supervisord.conf &
|
||||||
php-fpm -D
|
php-fpm -D
|
||||||
|
envsubst "${NGINX_HOST} ${NGINX_PORT}" < /etc/nginx/templates/default.conf.template > /etc/nginx/conf.d/default.conf
|
||||||
exec nginx -g "daemon off;"
|
exec nginx -g "daemon off;"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen ${NGINX_PORT};
|
||||||
server_name ${NGINX_HOST};
|
server_name ${NGINX_HOST};
|
||||||
|
|
||||||
root /var/www/html/public;
|
root /var/www/html/public;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user