Skip to content

[feat] Optional database + Docker and local package with typesafe ORM addition (flags + install + setup) #1

@5m1Ly

Description

@5m1Ly

Important

I'm still working this issue out, please hold tight. Once this block is removed I'm done with the issue. :)

Summary

The current starter kit provides a clean base for spinning up a FiveM server with Bun, but has no built-in story for database access, containerized development, etc yet.

This issue proposes adding following optional flags which execute some defined set of code:

  1. Optional --db + --db <provider> + --db=<provider> flag. Which should in turn:
    • setup an empty database for the given provider (sqlite, mysql, postgresql, etc)
    • create a user for the created database
    • setup environment variables / config server variables for the database
  2. Optional --docker + --docker <provider> + --docker=<provider> flag which depends on the --db flag. Which should in turn:
    • create a docker compose file for the configured provider
    • compose the docker container
    • trigger the action otherwise triggered by the --db flag which will then setup the database inside of the container
  3. Optional --orm + --orm <provider> + --orm=<provider> flag. Which should in turn:
    • setup a new typescript project inside the root of the project
      /fxserver
      |_ /database <- here
      |_ /scripts
      |_ /server-data
      
    • install the dependencies required to use the selected ORM (Mikro-ORM, Prisma, etc)
    • optionaly trigger the functions used by the --docker or --db flags for further setup and configuration

My Motivation

The Possible Benefits

What Could Lead To Deriving From Initial Project Purpose

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions