- 4
- 35 280
KaizneCodes
Canada
เข้าร่วมเมื่อ 11 ก.ย. 2022
Deploy Strapi on Digital Ocean Full Guide
m.do.co/c/254ad59540d6 ($200 free trial)
docs.strapi.io/dev-docs/deployment/digitalocean-app-platform
www.npmjs.com/package/strapi-provider-upload-do
Code to add to middlewares.ts file:
{
name: "strapi::security",
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
"connect-src": ["'self'", "https:"],
"img-src": [
"'self'",
"data:",
"blob:",
"*.digitaloceanspaces.com"
],
"media-src": ["'self'", "data:", "blob:"],
upgradeInsecureRequests: null,
},
},
},
}
docs.strapi.io/dev-docs/deployment/digitalocean-app-platform
www.npmjs.com/package/strapi-provider-upload-do
Code to add to middlewares.ts file:
{
name: "strapi::security",
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
"connect-src": ["'self'", "https:"],
"img-src": [
"'self'",
"data:",
"blob:",
"*.digitaloceanspaces.com"
],
"media-src": ["'self'", "data:", "blob:"],
upgradeInsecureRequests: null,
},
},
},
}
มุมมอง: 8 418
วีดีโอ
How To Deploy Docker Image For Free On Google Cloud
มุมมอง 15Kปีที่แล้ว
How To Deploy Docker Image For Free On Google Cloud
GitHub CI/CD Next.js Docker on Google Cloud
มุมมอง 3Kปีที่แล้ว
GitHub CI/CD Next.js Docker on Google Cloud
Deploy Next.js with Docker on Google Cloud
มุมมอง 9Kปีที่แล้ว
Deploy Next.js with Docker on Google Cloud
Very much appreciate this. You saved me ton of time. Thank you!!!!
How do you know its free. I cant find the pricing on Cloud Run
Thanks a ton man!
I have created strapi project on my local and my .env file looks like this -> APP_KEYS="toBeModified1,toBeModified2" API_TOKEN_SALT=tobemodified ADMIN_JWT_SECRET=tobemodified TRANSFER_TOKEN_SALT=tobemodified JWT_SECRET=tobemodified Is this correct?
hey, Can I deploy MERN project using docker-compose.yaml directly on google cloud by this way ?
That was helpful 🎉🎉
Thanks bro
Thx Kaizne 😉
Yo, this super helpful and straight to the point!
Thank You for share. That was easy. I has a problem. The command " gcloud build" give me error when execute COPY from dockerfile. The problem was I have that directory in .gitignore . If you have the same problem check .gitignore and .dockerignore files.
Great video ! Exactly what i was trying to achieve ! You saved me a lot of time, thank you a lot (i subscribed) ! I got a question for you, do you think for a small/middle traffic website, i should deploy my next js blog as static files or ssr ?
thanks bro, this really helped me
it's actually the best guide on youtube thank you!
Thanks its really helped❤
thanks, i followed the official docs of Gcloud and i couldn't deploy, your video helped me a lot to deploy my api. Thank you!!!
Thanks Bro.
Ports Working ?
W video bro
Fantastic guide! Dude I honestly wish you have a fantastic year.
thanks a lot!! it's really good guide and a perfect explanation... it's sad that you don't have enough subscribers
Thanks for this tutorial man!
Really good tutorial, helped me out a lot. But I just wanted to give a warning to anyone wanting to replicate it - the strapi-provider-upload-do package appears to be outdated. I could be wrong but I've spent two days trying to get it to work, there hasn't been an update to it in 9 months, and all the documentation I can find is outdated. You (and I lol) will have to find another way to host your images.
i just tried and it worked
Thankyou
Thanks for this, really helpful. I'm plugging in a DO bucket that already has images in. Strapi doesn't seem to pull them through for me though. Is that just how it works or do you know if I need to configure something else?
There is an issue where videos (or maybe just larger files) don't contain "https:/" when uploaded. This makes video preview not work in strapi and can also cause issues on the frontend.
my guy! you are brilliant! where is the domain part?
Good thatks _)
Thank you man. I really, really, really appreciate it.
I have a NextJS project hosted on google cloud run and built through cloud build. I am having an issue with the ENV variables not able to be read in my NextJS app. Any idea why this might be? I've been stuck on this for days
.gcloudignore is copying the same value inside .gitignore if your project directory contains .gitignore that ignores .env then delete .env from you .gitignore and re-build gcloud docker image. Hope it helps!
How to add the .env variables? I've been struggling for days. Server side is working good. But on the client side, i got all of variables undefined.
.gcloudignore is copying the same value inside .gitignore if your project directory contains .gitignore that ignores .env then delete .env from you .gitignore and re-build gcloud docker image. Hope it helps!
Words can't express how much I appreciate this. You saved me a lot of time and trouble. I wish you everything you want.
Amazing, thank you so much!
Great guide.
Nice info
How to show the memory usage on terminal footer like yours ?
this is gold
Really good guide, was exactly what I was looking to do you've saved me a lot of time 🙏
How did you even figure this out??? Qué genio señor
godly level
What about environment variables? How to pass them from github secrets to dockerfile and lastly to cloud run?
I think you have to pass the secrets on the docker build command using the --secrets flag from docker build, then in docker file manage to read the secrets and set them with ENV and thats all.
be regular
kneel down and appreciate the free tutorial
@@francisyang4718 yeah i have appreciated it . but who the F are you say it ??
Does Nextjs image optimisation work here like it does in vercel?
Unfortunately, Next.js Image only works when you deploy on Vercel.
@@KaizneCodes So what about using it for GCP? Should we use it or not?
Does OG configerations work on cloud run?
just the info I wanted and nothing more or less. well played sir.
thank for share
Thank you very much, and now... how can I add my own domain ?
I recommend you look at this: cloud.google.com/run/docs/mapping-custom-domains
Thanks ❤❤❤❤❤ Brother I use auto generated domain Publically any problem for security purpose Or custom domain better therefore my backend project Please reply
For backend, using an autogenerated domain is fine as long as you restrict access to your front end only and not to the public.
exactly!@@KaizneCodes
Awesome! Thanks a lot!
Could you please tell me where can I find url of deployed version to use get, post etc requests in Postman?
It should be the app url, if you go into the apps tab on digital ocean or click into your project, in my case since my project name is "digital-ocean-strapi-example" it is like this: digital-ocean-strapi-example-h2iio.ondigitalocean.app/ and then to access the api you append api to the end of the url like this: digital-ocean-strapi-example-h2iio.ondigitalocean.app/api, more info can be found here: docs.strapi.io/dev-docs/api/rest
Thanks I know it’s main url+ / example . I could find them in a role section. Thanks a lot
Thank you!@@KaizneCodes
Thank you so much mate!
thanks! this guide really helped me