@@ -124,6 +124,25 @@ with the service name.
124
124
serverless auth deploy
125
125
```
126
126
127
+ The ` website ` service is a static website that is served from an AWS Lambda
128
+ function. As such, it can run locally without needing to use Dev Mode. However,
129
+ it has a dependency on the AI Chat service and the Auth service, so you must
130
+ configure environment variables locally.
131
+
132
+ ```
133
+ # If you have the jq CLI command installed you can use that with the --json flag
134
+ # on serverless info to get the URLs from the deployed services. If you do not
135
+ # have jq installed, you can get the URLs by running "serverless auth info" and
136
+ # "serverless ai-chat info" and copying the URLs manually into the environment
137
+ # variables.
138
+ export VITE_CHAT_API_URL=$(serverless aiChatApi info --json | jq -r '.outputs[] | select(.OutputKey == "ChatApiUrl") | .OutputValue')
139
+ export VITE_AUTH_API_URL=$(serverless auth info --json | jq -r '.outputs[] | select(.OutputKey == "AuthApiUrl") | .OutputValue')
140
+
141
+ # now you can run the local development server
142
+ cd website/app
143
+ npm run build
144
+ ```
145
+
127
146
## 4. Prepare & release to prod
128
147
129
148
Now that the app is up and running in a development environment, lets get it
@@ -155,8 +174,10 @@ https://us-east-1.console.aws.amazon.com/acm/home?region=us-east-1#/certificates
155
174
This example uses a Certificate with the following full qualified domain names:
156
175
157
176
```
177
+
158
178
awsaistack.com
159
- *.awsaistack.com
179
+ \*.awsaistack.com
180
+
160
181
```
161
182
162
183
The base domain name, ` awsaistack.com ` is used for the website service
@@ -189,7 +210,9 @@ with a key like `/awsaistack/shared-token`, and set it in the
189
210
` sharedTokenSecret ` parameter in the ` serverless-compose.yml ` file:
190
211
191
212
```
213
+
192
214
sharedTokenSecret: ${ssm:/awsaistack/shared-token}
215
+
193
216
```
194
217
195
218
### Deploy to prod
@@ -198,7 +221,9 @@ Once you've setup the custom domain name (optional), and created the secret, you
198
221
are ready to deploy the service to prod.
199
222
200
223
```
224
+
201
225
serverless deploy --stage prod
226
+
202
227
```
203
228
204
229
Now you can use the service by visiting your domain name, or
0 commit comments