feat: nginx配置
This commit is contained in:
parent
3629796786
commit
eed15cd23c
@ -8,13 +8,12 @@ WORKDIR /xiaoju-survey
|
|||||||
COPY . /xiaoju-survey
|
COPY . /xiaoju-survey
|
||||||
|
|
||||||
# 安装nginx
|
# 安装nginx
|
||||||
RUN apt-get update && \
|
RUN apt-get update && apt-get install -y nginx
|
||||||
apt-get install -y nginx
|
|
||||||
|
|
||||||
RUN npm config set registry https://registry.npmjs.org/
|
RUN npm config set registry https://registry.npmjs.org/
|
||||||
|
|
||||||
# 安装项目依赖
|
# 安装项目依赖
|
||||||
RUN cd /xiaoju-survey/web && npm install && npm run build
|
RUN cd /xiaoju-survey/web && npm install && npm run build-only
|
||||||
|
|
||||||
# 覆盖nginx配置文件
|
# 覆盖nginx配置文件
|
||||||
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
|
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
@ -15,11 +15,11 @@ services:
|
|||||||
- xiaoju-survey
|
- xiaoju-survey
|
||||||
|
|
||||||
xiaoju-survey:
|
xiaoju-survey:
|
||||||
image: "xiaojusurvey/xiaoju-survey:1.1.0-slim"
|
image: "xiaojusurvey/xiaoju-survey:1.1.2-slim"
|
||||||
container_name: xiaoju-survey
|
container_name: xiaoju-survey
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080" # API端口
|
- "8080:80" # API端口
|
||||||
environment:
|
environment:
|
||||||
XIAOJU_SURVEY_MONGO_URL: mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@xiaoju-survey-mongo:27017 # docker-compose 会根据容器名称自动处理
|
XIAOJU_SURVEY_MONGO_URL: mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@xiaoju-survey-mongo:27017 # docker-compose 会根据容器名称自动处理
|
||||||
links:
|
links:
|
||||||
|
Loading…
Reference in New Issue
Block a user