-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
47 lines (40 loc) · 1.67 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
# --------------------------------------------------------------------------------
# Dockerfile for Installing Flex Flex plugins and Task Routers
#
# To run,
#
# - install Docker desktop on your machine
# - TBD
#
# --------------------------------------------------------------------------------
FROM twilio/twilio-cli:latest
ARG TWILIO_ACCOUNT_SID=sid
ARG TWILIO_AUTH_TOKEN=token
ARG REACT_APP_TELEHEALTH_URL=telehealthUrl
ARG REACT_APP_NGROK_URL=url
# Download serverless and flex plugin CLIs
RUN twilio plugins:install @twilio-labs/plugin-serverless
RUN twilio plugins:install @twilio-labs/plugin-flex
# Copy directory over to /hls-deploy folder
WORKDIR /hls-deploy
COPY . /hls-deploy
WORKDIR /hls-deploy/plugin-backend
RUN npm install
RUN echo "REACT_APP_NGROK_URL=${REACT_APP_NGROK_URL}" > .env
RUN echo "gfAccountKey=6735d87e-1cd1-4b7b-ab00-719ff6f05507" >> .env
RUN echo "gfAccountSecret=1Eu7MkApmwjvKdSERDLJpnLCVb8BMgaMOaaY1krcH30=" >> .env
RUN echo "gfApiUrl=https://api.geofluent.com/Translation/v3/" >> .env
RUN echo "REACT_APP_BACKEND_URL=$(eval twilio serverless:deploy --override-existing-project --runtime node14 -o=json | grep -o '"domain": "[^"]*' | grep -o '[^"]*$')" >> .env
RUN cp .env /hls-deploy
WORKDIR /hls-deploy
RUN echo "REACT_APP_TELEHEALTH_URL=${REACT_APP_TELEHEALTH_URL}" >> .env
RUN npm install
# Run deploy command to get a working version
RUN twilio flex:plugins:deploy --major --changelog 'Deploy Major HLS Flex Plugin' --description 'Deployment' -l debug
# Installer folder is now working directory
WORKDIR /hls-deploy/installer
RUN npm install
RUN npm run build-ts
RUN npx tailwindcss -i ./src/index.css -o ./assets/style.css
EXPOSE 3000 3001
CMD ["npm", "run", "start"]