-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (19 loc) · 944 Bytes
/
Dockerfile
File metadata and controls
34 lines (19 loc) · 944 Bytes
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
# ------------------------------ BUILD CONTAINER -------------------------------
FROM 474766710609.dkr.ecr.us-east-2.amazonaws.com/jutta:latest AS webpack
WORKDIR /usr/src/structur-cms
COPY package.json yarn.lock /usr/src/structur-cms/
RUN yarn
COPY . /usr/src/structur-cms
RUN . secrets/aws.sh && yarn build:production
# ----------------------------- RUNTIME CONTAINER ------------------------------
FROM 474766710609.dkr.ecr.us-east-2.amazonaws.com/jutta:latest AS runtime
ENV NODE_ENV=production
WORKDIR /usr/lib/structur-cms
COPY --from=webpack /usr/src/structur-cms/dist /usr/lib/structur-cms/
COPY package.json yarn.lock /usr/lib/structur-cms/
RUN yarn install --production --cache-folder=/tmp/yarn-cache \
&& rm -rf /tmp/yarn-cache
COPY config/nginx/nginx.production.conf /etc/nginx/sites-enabled/cms.conf
RUN chown -R www-data:www-data /usr/lib/structur-cms
EXPOSE 80
CMD ["/sbin/nginx", "-c", "/etc/nginx/nginx.conf"]