File size: 612 Bytes
44787e0
8adfd48
4dc6135
b93ab27
c331020
 
0df509a
 
 
ba0f49b
a35971f
 
f168c00
 
 
 
0df509a
4dc6135
 
 
 
 
 
0406c85
f168c00
4dc6135
0406c85
 
 
3bc44aa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM justsong/one-api:latest

FROM nginx:alpine

EXPOSE 7860
ENV PORT 7860
ENV GLOBAL_WEB_RATE_LIMIT=600
ENV GLOBAL_API_RATE_LIMIT=1800

# RUN mkdir /data/logs
RUN chmod -R 777 /data

# WORKDIR /data
# # 首先创建父目录
# RUN mkdir -p /data/logs && \
#     chmod -R 777 /data

# Nginx相关目录权限设置
RUN chmod 777 /var/cache/nginx && \
    mkdir -p /var/log/nginx && \
    chmod 777 /var/log/nginx && \
    touch /var/run/nginx.pid && \
    chmod 777 /var/run/nginx.pid

# # 复制配置文件
COPY nginx.conf /etc/nginx/nginx.conf
COPY start.sh /start.sh
RUN chmod +x /start.sh

CMD ["/start.sh"]