-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (31 loc) · 1021 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
FROM node:21.6.0-alpine3.18
WORKDIR /usr/local/app
COPY client/ ./client
COPY server/ ./server
ARG ALPHA_VANTAGE_APIKEY
ARG ALPHA_VANTAGE_BASE_URL
ARG CORS_LIST
ARG DATABASE_URL
ARG ENCRYPTION_KEY
ARG GOOGLE_OAUTH_CLIENT_ID
ARG GOOGLE_OAUTH_CLIENT_SECRET
ARG REACT_APP_BASE_URL
ARG REACT_APP_GOOGLE_CLIENT_ID
ARG TOKEN_SECRET
ENV ALPHA_VANTAGE_APIKEY=$ALPHA_VANTAGE_APIKEY
ENV ALPHA_VANTAGE_BASE_URL=$ALPHA_VANTAGE_BASE_URL
ENV CORS_LIST=$CORS_LIST
ENV DATABASE_URL=$DATABASE_URL
ENV ENCRYPTION_KEY=$ENCRYPTION_KEY
ENV GOOGLE_OAUTH_CLIENT_ID=$GOOGLE_OAUTH_CLIENT_ID
ENV GOOGLE_OAUTH_CLIENT_SECRET=$GOOGLE_OAUTH_CLIENT_SECRET
ENV REACT_APP_BASE_URL=$REACT_APP_BASE_URL
ENV REACT_APP_GOOGLE_CLIENT_ID=$REACT_APP_GOOGLE_CLIENT_ID
ENV TOKEN_SECRET=$TOKEN_SECRET
RUN npm install -g typescript serve
RUN cd client && npm install
RUN cd client && npm run build
RUN cd server && npm install
RUN cd server && npm run build
EXPOSE 3000
CMD [ "node", "server/build/bin/www.js" ]