Skip to content

Commit d406e75

Browse files
committed
initial guide
Signed-off-by: Luke Roy <[email protected]>
1 parent 4a020c1 commit d406e75

File tree

1 file changed

+46
-1
lines changed

1 file changed

+46
-1
lines changed

fotobox/README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,46 @@
1-
# IBM Fotobox
1+
# IBM Fotobox
2+
3+
1. Setup COS with cos bucket this can be done over the UI or using the CLI
4+
note dont the bucket name and API credentials
5+
6+
2. Deploy the Upload Function using the CLI
7+
```bash
8+
ibmcloud ce fn create --name fotobox-cos-upload --runtime python --build-source upload-function
9+
```
10+
11+
3. Deploy the Download App using the CLI
12+
```bash
13+
ibmcloud ce app create --name fotobox-get-pics --build-dockerfile Dockerfile --build-source download-app
14+
```
15+
16+
4. Create a Secret map containing the following values. use the following command to create the password
17+
```bash
18+
echo -n "password" | sha256
19+
5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8
20+
21+
```
22+
Secrets/environment variables
23+
```
24+
apikey="cos api key mus upload und download können"
25+
resource_instance_id="cos credential"
26+
bucket="mybucket"
27+
imageprefix="my-event-"
28+
passwords="5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"
29+
```
30+
31+
5. Reference the full secret to the function and the app
32+
33+
6. inside the the [stores.js](frontend-app/src/stores.js) replace the URLs to the upload function and download app
34+
35+
36+
```javascript
37+
export const uploadURL = "<replace with public function url>"
38+
export const downloadURL = "<replace with download app url"
39+
```
40+
41+
7. Deploy the app with the updates
42+
```bash
43+
ibmcloud ce app create --name fotobox-frontend --build-dockerfile Dockerfile --build-source frontend-app
44+
```
45+
46+
Now the Fotobox should be deployed and usable

0 commit comments

Comments
 (0)