Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Add database creation to docs #833

Closed
brandonjbjelland opened this issue Jan 5, 2018 · 1 comment
Closed

Add database creation to docs #833

brandonjbjelland opened this issue Jan 5, 2018 · 1 comment

Comments

@brandonjbjelland
Copy link

brandonjbjelland commented Jan 5, 2018

This project is great and I can't wait to dive in further. Thanks for creating/maintaining it!

Getting started with buffalo has been relatively easy on one of my workstations but getting the database up was easily the part that had me opening a slew of tabs to google around. Where's a known good docker container that can run postgres/sqlite3/mysql? How to run the container such that it runs on the correct port, or is accessible by name, or creates a database file we can use straight away? It didn't take super long to resolve but it wasn't trivial for someone even having experience with these technologies.

I suggest lowering the bar for initial set up by:

  1. defaulting development to use sqlite3 rather than postgresql. Eliminating credentials, port numbers, etc. is a boon when someone is just wanting to give it a spin.
  2. providing quick and easy commands to get the database running if buffalo is not going to handle that on the user's behalf. I used touch dev-db.sqlite ; docker run --rm -it -v ${PWD}/dev-db.sqlite:/db/db.db spartakode/sqlite3:latest
@markbates
Copy link
Member

markbates commented Jan 6, 2018

I'm closing this ticket, because it really belongs on the documentation site.

I would love to see more documentation for helping people get databases installed on their systems. It takes a lot of work, and requires the community to pitch in there. There are a lot of OSes and database combinations. Same with docker and such, a lot of combinations. A great place to start would be to add a generated docker compose file to new projects.

In regards to SQLite, it's actually not as easy as it sounds at first crack, in fact, SQLite is going to become opt-in functionality, see: https://github.com/markbates/pop/issues/164

The biggest problem with SQLite is that it is CGO, which requires a GCC installed, which a LOT of people don't have installed, especially on Windows, it's been the #1 obstacle for those trying to install Buffalo. It's also not installed a lot of systems by default, so that too requires a lot of work by the end user.

If you have some good instructions on setting up a Buffalo app to use Docker, or something else, for DB, please open a PR on the docs site, or even better, open a PR here to generate the necessary files. I'm sure it will be very, very well received. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants