-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#FROM node:8-alpine as builder | ||
#WORKDIR /usr/src/app | ||
#COPY package.json package-lock.json ./ | ||
#RUN npm install | ||
#COPY . . | ||
#RUN $(npm bin)/ng build --target=production --environment=prod --aot=false | ||
# | ||
#FROM nginx:1.13.12 | ||
#WORKDIR /var/RareCODE-WebApp/ | ||
#COPY --from=builder /usr/src/app/dist . | ||
#RUN rm /etc/nginx/conf.d/default.conf | ||
#ADD app.conf /etc/nginx/nginx.conf | ||
#RUN echo "Asia/Shanghai" > /etc/timezone && rm /etc/localtime && dpkg-reconfigure -f noninteractive tzdata | ||
#EXPOSE 80 | ||
|
||
FROM nginx:1.13.12 | ||
WORKDIR /usr/src/app | ||
RUN apt-get update && apt-get install -y curl build-essential && curl -sL https://deb.nodesource.com/setup_9.x | bash - | ||
RUN apt-get install -y nodejs && rm -rf /var/lib/apt/lists/* && npm install yarn -y | ||
COPY package.json package-lock.json ./ | ||
RUN yarn add | ||
COPY . . | ||
RUN yarn build | ||
|
||
WORKDIR /var/app/ | ||
RUN cp -r /usr/src/app/build/* . && rm -rf /usr/src/app/ | ||
RUN rm /etc/nginx/conf.d/default.conf | ||
ADD app.conf /etc/nginx/nginx.conf | ||
RUN echo "Asia/Shanghai" > /etc/timezone && rm /etc/localtime && dpkg-reconfigure -f noninteractive tzdata | ||
EXPOSE 80 |