Skip to content

Latest commit

 

History

History
171 lines (114 loc) · 5.25 KB

CONTRIBUTING.md

File metadata and controls

171 lines (114 loc) · 5.25 KB

Contribution Guidelines

Table of contents


Getting started

When contributing to `envless`, whether on GitHub or in other community spaces:
  • Be respectful, civil, and open-minded.
  • Before opening a new pull request, try searching through the issue tracker for known issues or fixes.
  • If you want to make code changes based on your personal opinion(s), make sure you open an issue first describing the changes you want to make, and open a pull request only when your suggestions get approved by maintainers.

In order to not waste your time implementing a change that has already been declined, or is generally not needed, start by opening an issue describing the problem you would like to solve.


Setup development environment

Development environment with Docker

  • Install Docker on your machine.

  • Install Docker Compose on your machine.

  • Fork the repository

  • Clone the repository

    git clone https://github.com/<your-github-name>/envless.git
  • Copy .env.example to .env

    cp .env.example .env`
  • Run the following command to start the development environment on particular service

    # Replace ${service} with www, docs or platform
    docker compose up ${service} --build
    
    # Or simply run the following command if you have already built the images
    docker compose up ${service}

    Note Database migration and seeds are run automatilly when running docker by default, to change that behaviour and speedup docker, you could change command: directive in compose.yml:33 making it look like:

command: platform

so that entrypoint.sh will not run generate, migrate and seed commands everytime you start the server.

  • Running docker compose up --build will start all the services on their respective ports.
    • platform: http://localhost:3000
    • docs: http://localhost:3001
    • www: http://localhost:3002

Development environment without Docker

This has been tested on Mac OS and works really well. So, if you are on Mac this setup performs way better than docker.

  • Fork the repository

  • Clone the repository

    git clone https://github.com/<your-github-name>/envless.git
  • Copy .env.example to .env

    cp .env.example .env
  • Install latest version of node and yarn

  • Install latest version of postgres database

  • Create database envless in postgres database

  • Update .env file's DATABASE_URL with database credentials

  • For a quick start, you can use Supabase or Neon as well.

  • Run the following command to install dependencies

    yarn install
  • Run the following command to migrate and seed the database

    yarn db:migrate
    yarn db:seed
  • Run the following command to start the development environment on particular service

    # Replace ${service} with www, docs or platform
    yarn dev --filter=${service}
  • Running yarn dev will start all the services on their respective ports.

    • platform: http://localhost:3000
    • docs: http://localhost:3001
    • www: http://localhost:3002

Setup Postgres Database


Implement your changes

When making commits, make sure to follow the conventional commit guidelines, i.e. prepending the message with feat:, fix:, chore:, docs:, etc... You can use git status to double check which files have not yet been staged for commit:

git add <file> && git commit -m "feat/fix/chore/docs: commit message"

Open a pull request

When you're done

Check that your code follows the project's style guidelines by running:

yarn format

Then, make a commit and push your code to your github fork and make a pull-request.

Thanks for your contributions. Much ❤️


Community

Please join us on our community channels to get help, discuss features, or just hang out.


Contributors

A table of avatars from the project's contributors