This commit is contained in:
Jay 2018-08-24 22:35:14 +08:00
parent dabdcf0143
commit 5db5034765
3 changed files with 5 additions and 8 deletions

View File

@ -1,10 +1,10 @@
FROM nginx:alpine
LABEL maintainer="Jay <admin@trj.tw>"
ARG PREFIX
# ARG PREFIX
RUN mkdir -p /data
WORKDIR /data
COPY dist/ /data
COPY nginx.conf /etc/nginx/conf.d/default.conf
RUN sed -i 's@\$\$prefix\$\$@'${PREFIX}'@' /etc/nginx/conf.d/default.conf
# RUN sed -i 's@\$\$prefix\$\$@'${PREFIX}'@' /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@ -4,15 +4,12 @@ server {
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
port_in_redirect off;
root /data;
index index.html;
location ^~ $$prefix$$/ {
location /web {
alias /data/;
}
location / {
try_files $uri $uri/ /index.html;
}
}