-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuildspec.yml
58 lines (58 loc) · 1.63 KB
/
buildspec.yml
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
48
49
50
51
52
53
54
55
56
57
58
# Do not change version. This is the version of aws buildspec, not the version of your buldspec file.
version: 0.2
env:
variables:
AWS_ENVIRONMENT: "production"
phases:
install:
runtime-versions:
nodejs: 10
pre_build:
commands:
- echo Installing api NPM dependencies...
- ( cd api && npm install )
- echo Installing app NPM dependencies...
- ( cd app && npm install )
- echo Installing lambda NPM dependencies...
build:
commands:
- echo Build api started on `date`
- ( cd api && npm run build )
- echo Build app started on `date`
- ( cd app && npm run build -- --prod )
post_build:
commands:
- echo Build completed on `date`
# Include only the files required for your application to run.
# Do not use recursively include artifacts from node_modules directory as it will include unnecessary packages
# used only for building and testing.
# ExpressJS apps will need other artifact directories included (bin/*, public/*, routes/*, views/* etc).
artifacts:
files:
- ./api/dist/**/*
- ./api/migrations/*
- ./api/migration-scripts/*
- ./api/database.json
- ./api/wait-for-db.js
- ./api/package.json
- ./backend/.npmrc
- ./app/dist/**/*
secondary-artifacts:
ApiArtifact:
base-directory: ./api
files:
- ./dist/**/*
- ./migrations/*
- ./migration-scripts/*
- ./wait-for-db.js
- ./database.json
- ./package.json
- ./.npmrc
AppArtifact:
base-directory: ./app/dist
files:
- ./**/*
cache:
paths:
- ./api/node_modules/**/*
- ./app/node_modules/**/*