shazow / dispatch

Bike Brigade's dispatching software 🚴

Home Page:https://bikebrigade.ca

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CI

BikeBrigade

🎬 Project Board

Prerequisities

  1. nix with flakes enabled
  2. docker

Getting an environment set up

  1. Clone this repo
  2. Copy the env file cp .env.local.sample .env.local
  3. Run nix develop inside the directory. This will create an environment that has all the dependencies installed locally. If you don't have flakes enabled, there's a backwards-compatible nix-shell as well.
  4. Inside the nix shell, run docker-compose up -d
  5. Setup everything, run mix bb.init

Development environment

You'll want to be inside the nix-shell when working on this project. Make sure postgres is running with docker-compose up -d

As you develop, when you've downloaded new code, you can run mix setup to update the dependencies and run any migrations.

To start the server & console run:

scripts/server

Note: if you want the Elixir language server to be accessible to your editor, you will have to launch your editor from within the nix-shell, or do some direnv or lorri magic.

Testing

You can run the entire test suite with

scripts/test

If you wish to run a specific test you can provide a file and optionally a line number

scripts/test path/to/test.exs:LINENUMBER

Updating nix dependencies

niv is used to ensure everyone is using the same version of nixpkgs. To update the nixpkgs version run:

nix-shell -p niv
niv update

You can then commit the changes.

Deploying

Staging

Force push to the staging branch in order to deploy to staging

scripts/deploy_staging

Production

Pushes to the main branch (including merged PRs) automatically trigger a production deploy. Please be aware of this when pushing small changes without a PR.

External dependencies

Contributors

This project's history has been squashed as part of open-sourcing, so not all contributions are reflected in the Git history.

Please see CONTRIBUTORS.md for the list of contributors.

License

Copyright 2021 The Bike Brigade Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Bike Brigade's dispatching software 🚴

https://bikebrigade.ca

License:Apache License 2.0


Languages

Language:Elixir 63.2%Language:HTML 33.0%Language:JavaScript 1.7%Language:Nix 1.1%Language:Shell 0.5%Language:Dockerfile 0.3%Language:CSS 0.2%