-
Notifications
You must be signed in to change notification settings - Fork 0
/
blueprint.yaml
68 lines (63 loc) · 1.4 KB
/
blueprint.yaml
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
59
60
61
62
63
64
65
66
67
68
name: Nodejs Vue Template Todo App
components:
- name: TodoApi
type: service
image: node:20-alpine
root: api-service
port: 3000
build:
steps:
- directory: /api-service
- copy: package*.json
destination: ./
- run: npm ci
- copy: index.js
- copy: dynamodb.js
- copy: s3.js
runtime:
command: node index.js
resources:
- TodoItems
- TodoUploads
variables:
AWS_REGION:
$env: region
DYNAMODB_TABLE:
$resources: TodoItems.tableName
DYNAMODB_ENDPOINT:
$resources: TodoItems.endpoint
S3_BUCKET:
$resources: TodoUploads.bucket
S3_ENDPOINT:
$resources: TodoUploads.endpoint
- name: TodoWebsite
type: static
image: node:20-alpine
root: website-static
hosting:
spa: true
build:
steps:
- directory: /website-static
- copy: package*.json
destination: ./
- run: npm ci
- copy: index.html
- copy: vite.config.js
- copy: public/
- copy: src/
- run: npm run build
- directory: dist/
routes:
- pattern: /api/**
target:
component: TodoApi
- target:
component: TodoWebsite
resources:
- name: TodoItems
type: dynamodb
hashKeyName: id
hashKeyType: S
- name: TodoUploads
type: s3