-
Notifications
You must be signed in to change notification settings - Fork 131
Fotobox #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fotobox #189
Conversation
Signed-off-by: Luke Roy <[email protected]>
Signed-off-by: Luke Roy <[email protected]>
Signed-off-by: Luke Roy <[email protected]>
Signed-off-by: Luke Roy <[email protected]>
@reggeenr Initial Pull request for the Fotobox |
Signed-off-by: Luke Roy <[email protected]>
Signed-off-by: Luke Roy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
thanks for pulling together this PR.
I suggest to apply a spelling check for the Readme. Apart from that, it would be great if we could migrate the COS integration to make use Trusted Profiles. The trusted profile setup should be doable with terraform, too.
One thing that needs to get addressed before merging this one, is to adjust the dockerfile and make sure to not rely on Dockerhub and to use scratch images, if possible.
@@ -0,0 +1,75 @@ | |||
# IBM Fotobox | |||
|
|||
This is the IBM Fotobox. Deploy your own Fotobox straight to the IBM Cloud Access it directly from any device with browser and camera. Take Pictures and view them all from your device. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the IBM Fotobox. Deploy your own Fotobox straight to the IBM Cloud Access it directly from any device with browser and camera. Take Pictures and view them all from your device. | |
This is the IBM Fotobox. Deploy your own Fotobox straight to the IBM Cloud, and access it directly from any device with browser and camera. Take pictures and view them all from your device. |
|
||
The solution is based on: | ||
- The frontend a Svelte Single Page Application running as a App on Code Engine able to scale to 0 in oder to optimise cost. | ||
- The Upload function which generates a thumbnail of the image and stores both in COS written in Python and running as a Function on Code Engine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The Upload function which generates a thumbnail of the image and stores both in COS written in Python and running as a Function on Code Engine. | |
- The "upload" function which generates a thumbnail of the image and stores both in COS written in Python and running as a Code Engine function. |
This is the IBM Fotobox. Deploy your own Fotobox straight to the IBM Cloud Access it directly from any device with browser and camera. Take Pictures and view them all from your device. | ||
|
||
The solution is based on: | ||
- The frontend a Svelte Single Page Application running as a App on Code Engine able to scale to 0 in oder to optimise cost. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The frontend a Svelte Single Page Application running as a App on Code Engine able to scale to 0 in oder to optimise cost. | |
- The "frontend" a Svelte Single Page Application (SPA) running as a Code Engine app, that is able to scale to 0 in oder to optimise cost. |
The solution is based on: | ||
- The frontend a Svelte Single Page Application running as a App on Code Engine able to scale to 0 in oder to optimise cost. | ||
- The Upload function which generates a thumbnail of the image and stores both in COS written in Python and running as a Function on Code Engine. | ||
- The Downloader a Go programm designed to serve the images stored in COS or download all at one go if you are the operator of the fotobox. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The Downloader a Go programm designed to serve the images stored in COS or download all at one go if you are the operator of the fotobox. | |
- The "downloader" a Go program designed to serve the images stored in COS or download all at one go if you are the operator of the fotobox. |
- The frontend a Svelte Single Page Application running as a App on Code Engine able to scale to 0 in oder to optimise cost. | ||
- The Upload function which generates a thumbnail of the image and stores both in COS written in Python and running as a Function on Code Engine. | ||
- The Downloader a Go programm designed to serve the images stored in COS or download all at one go if you are the operator of the fotobox. | ||
- All Images are stored in IBM Cloud Object Storage to ensure security and scalability. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- All Images are stored in IBM Cloud Object Storage to ensure security and scalability. | |
- All images are stored in IBM Cloud Object Storage to ensure security and scalability. |
ibmcloud ce app create --name fotobox-get-pics --build-dockerfile Dockerfile --build-source download-app | ||
``` | ||
|
||
4. Create a Secret map containing the following values. use the following command to create the password |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4. Create a Secret map containing the following values. use the following command to create the password | |
4. Create a secret map containing the following values. Use the following command to create the password |
} | ||
} | ||
|
||
#resource "ibm_code_engine_secret" "registry_secret" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we don't need that because we are serving the fotobox from a public image, right?
@@ -0,0 +1,31 @@ | |||
FROM golang:1.23 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't use a dockerhub image as base image.
I suggest to take a look at the following dockerfile that gives you a working example that builds a scratch image
Credentials: ibmiam.NewStaticCredentials( | ||
aws.NewConfig(), | ||
authEndpoint, | ||
apiKey, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered to migrate this to trusted profiles at a later point in time?
@@ -0,0 +1,25 @@ | |||
FROM --platform=linux/amd64 node:22 as build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not use dockerhub images as base images.
Following example can probably help you to adopt a Node.js scratch image
https://github.com/IBM/CodeEngine/blob/main/cos-to-sql/Dockerfile
Initial Pull request with the IBM Fotobox