feat: migrate to postgresql
@ndelvalle I'm trying to dockerize this to make it easier to setup and run but the code panics,
=> => naming to docker.io/library/rustapi-app 0.0s
[+] Running 2/0
ā Container rustapi-database-1 Running 0.0s
ā Container rustapi-app-1 Recreated 0.0s
Attaching to app-1, database-1
app-1 | thread 'main' panicked at src/settings.rs:7:34:
app-1 | Failed to setup settings: configuration file "config/default" not found
app-1 | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
app-1 exited with code 101
Can we possibly revamp the application config using yaml like i did here https://github.com/opeolluwa/backend-in-rust/blob/master/02_auth_jwt/src/config.rs or best we use environment variables
@opeolluwa yeah I think having to ship config files is not ideal if you want to have a single binary. I think the way to go would be to just use env vars instead of any config file, not even use yaml.
Awesome, I know we'd have a port, JWT signing key and database connection. Would that be all or there's more
@opeolluwa Regarding the Docker image, Iām not completely sure. Initially, I wanted the project to include lots of features, but now days Iām leaning towards keeping it as simple as possible, is easier to mantain. If we do decide to include Docker, I think we should use the official Rust image tho.
Hmmm
Awesome, I know we'd have a port, JWT signing key and database connection. Would that be all or there's more
Here is what we use: https://github.com/ndelvalle/rustapi/blob/master/src/settings.rs. I think that even if we don't ship a config file is cool to have a layered config to provide flexibility using https://github.com/mehcode/config-rs or or something similar.
The primary reason for docker is because of the database, actually
@ndelvalle would you mind docker or I should just use set up PostgreSQL locally