-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile.txt
More file actions
34 lines (24 loc) · 1.07 KB
/
Copy pathDockerfile.txt
File metadata and controls
34 lines (24 loc) · 1.07 KB
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
FROM amazon/aws-cli:latest
# Update yum
RUN yum update -y
RUN yum install wget unzip default-jdk libfindbin-libs-perl -y
# Add node's source repo
RUN curl -sL https://rpm.nodesource.com/setup_14.x | bash -
# Install nodejs
RUN yum -y install nodejs
# Create a dedicated directory for the application
RUN mkdir -p /var/app
# Get the app from S3
# RUN aws s3 cp s3://awstecess02/app.zip
RUN wget https://aws-tc-largeobjects.s3-us-west-2.amazonaws.com/ILT-TF-100-TECESS-5/app/app.zip
# Unzip it into a specific folder
RUN unzip app.zip -d /var/app/
WORKDIR /var/app
# Update environment variables for app
RUN sed -i "s+process.env.PHOTOS_BUCKET || ''+process.env.PHOTOS_BUCKET || 'awstecess01'+g" /var/app/api/common/constants.js
RUN sed -i "s+process.env.DEFAULT_AWS_REGION || ''+process.env.DEFAULT_AWS_REGION || 'us-east-1'+g" /var/app/api/common/constants.js
RUN sed -i "s+process.env.SHOW_ADMIN_TOOLS || 0+process.env.SHOW_ADMIN_TOOLS || 1+g" /var/app/api/common/constants.js
# Install dependencies
RUN npm install
EXPOSE 80
RUN node server.js