-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (27 loc) · 1.19 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
# Build docker build . -t scalor-services
# Run docker run --env DOPPLER_TOKEN="dp.st.local.6ZIhU7eHIqZ7AXWAlyK4Q4yo4CynJgTTUqydqe1W2J3" --name scalor-services -d -p 7777:7777 scalor-services
FROM ubuntu:20.04
WORKDIR /home/app
COPY . /home/app
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=America/New_York
# install apt-get, curl, and node14
RUN apt-get update
RUN apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash
RUN apt-get install -y nodejs
RUN node --version
# install imageMagick
RUN apt-get install -y imagemagick
RUN mv policy.xml /etc/ImageMagick-6/
# install `ffmpeg`
RUN apt-get install -y ffmpeg
# Install Doppler for environment variables
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg
RUN curl -sLf --retry 3 --tlsv1.2 --proto "=https" 'https://packages.doppler.com/public/cli/gpg.DE2A7741A397C129.key' | apt-key add -
RUN echo "deb https://packages.doppler.com/public/cli/deb/debian any-version main" | tee /etc/apt/sources.list.d/doppler-cli.list
RUN apt-get update && apt-get install doppler
# Ensure you are in the proper directory
RUN npm ci \
&& npm run build
CMD ["doppler", "run", "--", "node", ".dist/index.js"]