5Feature branches are merged into `master`. There is no `develop` branch.
10Everything is built with [nix](https://nixos.org). To build the project you will need to install it.
13curl https://nixos.org/nix/install | sh
20To speedup initial project builds you will want to set up the haskell.nix binary nix cache – append the following to `/etc/nix/nix.conf`:
23binary-caches = https://hydra.iohk.io https://cache.nixos.org/
24binary-cache-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=
25binary-caches-parallel-connections = 40
30The Octopod cache will also be useful to speed up builds:
321. Install [Cachix](https://cachix.org):
35 nix-env -iA cachix -f https://cachix.org/api/v1/install
44We have written a `Makefile` with common targets used during development.
48- `build-backend` – builds a release backend executable.
49- `build-octo-cli` – builds a release octo CLI executable. NOTE: this is not the octo CLI executable that is used for distribution but the dependencies are close enough for development purposes.
50- `build-frontend` – build the frontend release.
54For development, we have set up `ghcid` commands that rebuild the project every time you make a change. The targets should self-explanatory:
60### Running the project locally
62We have two commands to run the backend and frontend in the `Makefile`:
66 Builds a production version of the backend server, runs database migrations and starts the server with mock control scripts. You can see the used config in [`dev/dev_backend.sh`](./dev/dev_backend.sh).
70 1. You need to have a [Postgres](https://www.postgresql.org) database running on `localhost:5432` (the default port).
72 2. You need to create an empty `octopod` database.
74 3. You also need to have an `octopod:octopod` user set up as it will be used by the server to access the database.
76 The easiest way to do this is by running the following command after you have _Postgres running_:
78 psql -c "CREATE ROLE IF NOT EXISTS octopod WITH PASSWORD 'octopod' SUPERUSER LOGIN;"
81 4. You will need [sqitch](https://sqitch.org) installed on your system as it will be used to run migrations on the database.
85 Build a production version of the frontend and runs it locally, pointing it to the locally running backend server.
89 You need to have [_Caddy 2_](https://caddyserver.com/v2) installed on your system as it is automatically used as a proxy.
93For convenience, the repo currently also contains a `stack.yaml` that can be used for development. It is only used to build the macOS octo CLI release but supports building both octo CLI and the _Octopod Server_ in an environment close enough to the release environment to be useful during development if you prefer stack.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list