/
Dockerfile
43 lines (31 loc) · 1007 Bytes
/
Dockerfile
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
39
40
41
42
43
# Alpine 3.15 is the last version to support Python 2.
FROM node:12.22.6-alpine as builder
# Install OS packages.
RUN apk add --no-cache \
giflib-dev
RUN apk add bash
WORKDIR code
# Install Yarn packages.
COPY code/package.json code/yarn.lock ./
RUN yarn install --inline-builds && yarn cache clean
# Install node project.
COPY code/ .
# On some machines, the webpack dev server on the container won't accept connections from the host on localhost.
# Make the development server listen on 0.0.0.0 instead to accept connections from all addresses.
ENV RODAN_CLIENT_DEVELOP_HOST 0.0.0.0
# Build the project.
COPY ./config/configuration.json configuration.json
RUN yarn run dist
# Host the project.
FROM nginx:alpine
EXPOSE 80
# Copy nginx conf.
COPY scripts/nginx.conf /etc/nginx/nginx.conf
WORKDIR /client
# Copy project from builder.
COPY --from=builder /code/dist/ .
#RUN mkdir resources \
# && mv favicon.iso resources \
# && mv grids-responsive-min.css resources
# Host server.
CMD nginx