forked from ajslater/codex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.build
More file actions
46 lines (33 loc) · 839 Bytes
/
Dockerfile.build
File metadata and controls
46 lines (33 loc) · 839 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
35
36
37
38
39
40
41
42
43
44
45
46
FROM ajslater/codex-builder:focal_1.0.0-db5d3fe
ARG DEBIAN_FRONTEND=noninteractive
#############
# APP SETUP #
#############
RUN echo "**** copying source for dev build ****"
COPY . .
RUN ./setup-dev.sh
########
# TEST #
########
WORKDIR /app
RUN echo "*** run lint ***"
RUN ./lint.sh
RUN echo "*** run tests ***"
RUN ./test.sh
#########
# BUILD #
#########
WORKDIR /app/frontend
RUN echo "*** build frontend ***" && \
rm -rf ../codex/static_build && \
npm run build
WORKDIR /app
RUN echo "*** collect static resources in one place ***" && \
./collectstatic.sh
# XXX poetry auto-excludes anything in gitignore. Dirty hack around that.
RUN echo "*** build and package application ***" && \
sed -i "s/.*static_root.*//" .gitignore && \
poetry build
VOLUME /dist
VOLUME /test-results
CMD ["./build-copy-artifacts.sh"]