irongit

'test build'

huncholanehuncholaneauthored
parent 0f44bd9commit ad3a188c7073a13b883d3543c446a20396e88d81Browse files

3 files changed, +18 -9

+0-7Client/dockerfile
@@ -1,7 +0,0 @@
1-FROM node:20
2-WORKDIR /code
3-COPY package.json .
4-RUN npm i
5-COPY . .
6-RUN npm run build
7-CMD [""]
+12-1buildspec.yml
@@ -3,6 +3,7 @@ version: 0.2
33 env:
44 variables:
55 REACT_APP_BASE_URL: "http://localhost:5001/"
6+ CLOUDFRONT_ID: "E1VDTBR7TV8GO0"
67
78 phases:
89 install:
@@ -10,6 +11,15 @@ phases:
1011 - echo Installing dependencies...
1112 - cd Client && npm i
1213 - cd ../server && npm i
14+ - echo Ensuring artifact bucket
15+ - aws s3api create-bucket --bucket hygo.real-e-state.artifacts --create-bucket-configuration LocationConstraint=us-west-1
16+ - echo Ensuring cache bucket
17+ - aws s3api create-bucket --bucket hygo.real-e-state.cache --create-bucket-configuration LocationConstraint=us-west-1
18+ - echo Ensuring frontend bucket
19+ - aws s3api create-bucket --bucket hygo.real-e-state.frontend --create-bucket-configuration LocationConstraint=us-west-1
20+ - aws s3api delete-public-access-block --bucket hygo.real-e-state.frontend
21+ - aws s3api put-bucket-policy --bucket hygo.real-e-state.frontend --policy file://Client/bucket-policy.json
22+ - aws s3 website hygo.real-e-state.frontend --index index.html --error index.html
1323
1424 build:
1525 commands:
@@ -21,7 +31,8 @@ phases:
2131 commands:
2232 # Copy the build output to your S3 bucket
2333 - echo Copying build files to S3 bucket...
24- - aws s3 sync ./Client/build/ s3://hygo.real-estate/ --delete
34+ - aws s3 website
35+ - aws s3 sync ./Client/build/ s3://hygo.real-e-state/ --delete
2536 cache:
2637 paths:
2738 - Client/node_modules
+6-1server/dockerfile
@@ -1 +1,6 @@
1-FROM node:
1+FROM node:20
2+WORKDIR /code
3+COPY package.json .
4+RUN npm i
5+COPY . .
6+CMD ["npm", "start"]