-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
90 lines (67 loc) · 2.56 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
ARG AGENCY_BASE_IMAGE=vcxagency-base:1.15.0
FROM ${AGENCY_BASE_IMAGE} as BASE
USER root
RUN apt-get update && \
apt-get install -y \
curl \
git
RUN groupadd -g 1001 app && \
useradd -r -u 1001 -g app app
RUN apt-get update && apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g yarn
WORKDIR /home/app/easy-indysdk
COPY --chown=app:app ./easy-indysdk ./
WORKDIR /home/app/vcxagency-client
COPY --chown=app:app ./vcxagency-client ./
WORKDIR /home/app/vcxagency-node
COPY --chown=app:app ./vcxagency-node ./
RUN chown -R app:app /home/app
FROM BASE as BUILD
USER root
RUN apt-get install -y make
RUN apt-get install -y g++
RUN apt-get install -y python
USER app
WORKDIR /home/app/vcxagency-node
RUN yarn install --production
FROM BASE
USER app
WORKDIR /home/app/easy-indysdk
COPY --from=BUILD --chown=app:app /home/app/easy-indysdk/ ./
WORKDIR /home/app/vcxagency-client
COPY --from=BUILD --chown=app:app /home/app/vcxagency-client/ ./
WORKDIR /home/app/vcxagency-node
COPY --from=BUILD --chown=app:app /home/app/vcxagency-node/ ./
LABEL org.label-schema.schema-version="1.1.0"
LABEL org.label-schema.name="vcxagency-node"
LABEL org.label-schema.description="Node VCX Agency"
ENV LOG_LEVEL ${LOG_LEVEL:-'true'}
ENV LOG_ENABLE_INDYSDK ${LOG_ENABLE_INDYSDK:-'false'}
ENV LOG_JSON_TO_CONSOLE ${LOG_JSON_TO_CONSOLE:-'true'}
ENV SERVER_MAX_REQUEST_SIZE_KB ${SERVER_MAX_REQUEST_SIZE_KB:-'300'}
ENV SERVER_PORT ${SERVER_PORT}
ENV SERVER_ENABLE_TLS ${SERVER_ENABLE_TLS}
ENV CERTIFICATE_PATH ${CERTIFICATE_PATH}
ENV CERTIFICATE_KEY_PATH ${CERTIFICATE_KEY_PATH}
ENV CERTIFICATE_AUTHORITY_PATH ${CERTIFICATE_AUTHORITY_PATH}
ENV AGENCY_WALLET_NAME ${AGENCY_WALLET_NAME}
ENV AGENCY_DID ${AGENCY_DID}
ENV AGENCY_SEED_SECRET ${AGENCY_SEED_SECRET}
ENV AGENCY_WALLET_KEY_SECRET ${AGENCY_WALLET_KEY_SECRET}
ENV PG_STORE_HOST ${PG_STORE_HOST}
ENV PG_STORE_PORT ${PG_STORE_PORT}
ENV PG_STORE_ACCOUNT ${PG_STORE_ACCOUNT}
ENV PG_STORE_PASSWORD_SECRET ${PG_STORE_PASSWORD_SECRET}
ENV PG_STORE_DATABASE ${PG_STORE_DATABASE}
ENV PG_WALLET_ACCOUNT ${PG_WALLET_ACCOUNT}
ENV PG_WALLET_PASSWORD_SECRET ${PG_WALLET_PASSWORD_SECRET}
ENV PG_WALLET_ADMIN_ACCOUNT ${PG_WALLET_ADMIN_ACCOUNT}
ENV PG_WALLET_ADMIN_PASSWORD_SECRET ${PG_WALLET_ADMIN_PASSWORD_SECRET}
ENV PG_WALLET_URL ${PG_WALLET_URL}
ENV PG_WALLET_MIN_IDLE_COUNT ${PG_WALLET_MIN_IDLE_COUNT:-1}
ENV PG_WALLET_MAX_CONNECTIONS ${PG_WALLET_MAX_CONNECTIONS:-'90'}
ENV PG_WALLET_CONNECTION_TIMEOUT_MINS ${PG_WALLET_CONNECTION_TIMEOUT_MINS:-'30'}
EXPOSE ${PORT}
CMD npm run serve