I recently installed OctoPrint on my Raspberry Pi so I could remotely control my 3D printer. I needed a good case for the Pi. I found one that allows me to mount the Pi to the 3D printer.

Raspberry Pi 3 Case for Creality Printers on Thingiverse

Here are my photos:

Front view

bottom view
t-nuts installed and ready for mounting
Case with Pi mounted to the printer (power supply removed so I could have room)
Final position on the printer

I'm having issues with my prints, so this isn't the prettiest case, but it's sturdy.

Update: My Raspberry Pi camera cable wasn't long enough to reach the back of the printer, so I moved the Pi to the front. I also wired up my Raspberry Pi's power directly to the Ender 3's main board so I didn't have to have an extra wall plug. This means that the Pi will turn on when I turn on the printer.

Image from TeachingTeach (https://youtu.be/yW9ovo9CHi0)

Update: The direct wiring approach does not work for me. I received under-voltage warnings from OctoPrint, so I had to go back to using a USB power supply.