forked from rancher/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.prod
38 lines (29 loc) · 926 Bytes
/
Dockerfile.prod
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
31
32
33
34
35
36
37
38
FROM rancher/docs:build as build
ARG ALGOLIA_APP_ID
ARG ALGOLIA_INDEX_NAME
ARG ALGOLIA_INDEX_FILE
ARG ALGOLIA_ADMIN_KEY
WORKDIR /run
COPY gulpfile.babel.js /run/
COPY .eslintrc.js /run/
COPY config.toml /run/
COPY netlify.toml /run/
COPY archetypes archetypes
COPY data data
COPY layouts layouts
COPY scripts scripts
COPY content content
COPY src src
ENV HUGO_ENV production
ADD https://github.com/rancherlabs/website-theme/archive/master.tar.gz master.tar.gz
RUN tar -xzf master.tar.gz --strip 1 -C /run/node_modules/rancher-website-theme && rm master.tar.gz
ENV ALGOLIA_APP_ID=$ALGOLIA_APP_ID
ENV ALGOLIA_INDEX_NAME=$ALGOLIA_INDEX_NAME
ENV ALGOLIA_INDEX_FILE=$ALGOLIA_INDEX_FILE
ENV ALGOLIA_ADMIN_KEY=$ALGOLIA_ADMIN_KEY
RUN gulp build
# Make sure something got built
RUN stat /run/public/index.html
FROM nginx
COPY --from=build /run/public /usr/share/nginx/html/docs/
COPY nginx.conf /etc/nginx/conf.d/default.conf