I have SvelteKit deployed to "CP" which depends on my Hono/Bun + MySQL

How to do this if I'm still in dev mode?
18 Replies
insidious
insidiousOP15mo ago
alternatively, for production, I can use Azure Cloud in order to connect my frontend to backend but I'm looking ways to integrate Docker Image I created earlier for localhost testing and it worked my problem right now Cloudflare Pages code I deployed(frontend) is not connecting with my Docker Image that has Backend + MySQL in the same compose I was hoping to make it work with Docker as it's for learning/testing purposes and FREE TO USE Anyone?
Cyb3r-Jak3
Cyb3r-Jak315mo ago
How are you trying to connect? Are you using the TCP socket api or an http adapter?
insidious
insidiousOP15mo ago
I remember putting cloudflare adapter Earlier it worked Localhost to Docker Compose Surprisingly, I even got the ip address of the docker image, replaced with localhost like Ip-address:3000/api Still didn’t work Help
Cyb3r-Jak3
Cyb3r-Jak315mo ago
What errors are you getting?
insidious
insidiousOP15mo ago
It’s not even connecting lol, 500
Cyb3r-Jak3
Cyb3r-Jak315mo ago
So do you see errors in wrangler logs?
insidious
insidiousOP15mo ago
I’m not using wrangler I’m connecting from CP to Docker ?
Cyb3r-Jak3
Cyb3r-Jak315mo ago
Then how are you testing the pages project? Wait are you trying to connect a production pages deployment to a local docker container?
insidious
insidiousOP15mo ago
Isn’t it dev/prod at the same time? This is my current state 😂
Cyb3r-Jak3
Cyb3r-Jak315mo ago
You'll need to make it so the pages project can reach the docker container. Which mean you'll either have to open ports on your firewall or find a cloud host for it
insidious
insidiousOP15mo ago
I think I like the first option, atm cloud hosting are paid, I just want something free for still undergoing project
Cyb3r-Jak3
Cyb3r-Jak315mo ago
You'll have to figure out how to open your ports on your router and forward to the docker container but it should work after that
insidious
insidiousOP15mo ago
I attempted to use Cloudflare Tunnels, I failed on that as well
insidious
insidiousOP15mo ago
No description
insidious
insidiousOP15mo ago
I created cloudflare tunnel under the same bridge I have created for others and then took the Gateway API, pasted in my frontend, still did not listen to it : ) anyone?)
Cyb3r-Jak3
Cyb3r-Jak315mo ago
What container are you using for your http to MySQL adapter?
insidious
insidiousOP15mo ago
It’s containerized under docker compose Full screenshot of the compose
Cyb3r-Jak3
Cyb3r-Jak315mo ago
Yeah I see containers for cloudflared, MySQL, HA proxy and whatever ifarmo is. Because you are using cloudflared you need to be using an sql driver that supports http and not tcp. You will then need a container in your compose to translate that http to MySQL container
Want results from more Discord servers?
Add your server