Viewing posts tagged coding

How to add Bootstrap to Gatsby

I tried adding Bootstrap 4 to my Gatsby 2.13.50 (CLI: 2.7.14) project today. Based on beginner tutorials I created a layout.js as the base template. It looks like this:

Gotchas with coding on remote machine with VS Code

I started trying out working on code on my remote machine (DigitalOcean Ubuntu droplet) using VS Code on my Windows 10 system a few days ago. Most of the instructions here are ok. A few things might be considered missing though.

How to connect to Postgres in Docker container

If you're learning how to use postgresql with Docker from tutorials online, you might have trouble connecting to postgresql in your container, perhaps especially if you're on Windows. This might help.

Do NOT delete bind mounted volume inside Docker container indiscriminately

I don't think it's been talked about much so I should share why it's a very bad no good terrible horrible idea to delete a mounted directory inside your Docker container without thinking through it. I'm on Windows 10 but I imagine we might make the same shameful mistake on Unix too.

Building a full ecommerce site part 2: handling Oscar's static files and templates

I realised today that if Mezzanine and Oscar share the same file names for a lot of templates and static files (in addition to urls, as mentioned in part 1), I should probably separate them more clearly. Especially since static files are collected into the same directory for production with collectstatic.