forked from inflection-zone/rean-admin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef49a2e
commit 8995bca
Showing
6 changed files
with
98 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM node:18.12.0-alpine3.16 AS builder | ||
|
||
WORKDIR /app | ||
COPY . . | ||
|
||
RUN npm install -g typescript | ||
RUN npm install | ||
RUN npm run build | ||
|
||
####################################### | ||
|
||
FROM node:18.12.0-alpine3.16 | ||
|
||
RUN apk add bash | ||
RUN apk add --no-cache \ | ||
python3 \ | ||
&& rm -rf /var/cache/apk/* | ||
RUN apk add --update alpine-sdk | ||
RUN apk add chromium \ | ||
harfbuzz | ||
|
||
RUN apk update | ||
RUN apk upgrade | ||
|
||
WORKDIR /app | ||
RUN rm -rf ./* | ||
|
||
COPY --from=builder ./app/package*.json ./ | ||
COPY --from=builder ./app/build . | ||
|
||
RUN npm install --production | ||
|
||
COPY . /app | ||
|
||
#CMD ["node", "index.js"] | ||
|
||
RUN chmod +x /app/entrypoint.sh | ||
ENTRYPOINT ["/bin/bash", "-c", "/app/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
#prod | ||
aws s3 cp s3://$S3_CONFIG_BUCKET/$S3_CONFIG_PATH/rean-admin-portal/.env ./.env | ||
aws s3 cp s3://$S3_CONFIG_BUCKET/$S3_CONFIG_PATH/rean-admin-portal/constants.ts /app/src/lib | ||
|
||
#aha-prod | ||
aws s3 cp s3://$S3_CONFIG_BUCKET/$S3_CONFIG_PATH/rean-admin-portal/.env ./.env | ||
aws s3 cp s3://$S3_CONFIG_BUCKET/$S3_CONFIG_PATH/rean-admin-portal/constants.ts /app/src/lib | ||
|
||
cd /app/build | ||
# Add any other scripts here... | ||
# Start the service | ||
# npm run start | ||
node index.js |