misc: update README

This commit is contained in:
Jeremy Denquin 2022-05-30 12:08:43 +02:00
parent aa5026c778
commit bc69459b14

View File

@ -1,76 +1,21 @@
# Lago
## Requirements
Lago is an open-source Stripe Billing alternative.
- Git
- Docker
- [Docker for Ubuntu](https://docs.docker.com/engine/install/ubuntu/)
- [Docker Desktop for MacOS](https://www.docker.com/products/docker-desktop)
- Homebrew (macOS only)
```shell
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
- OpenSSL
```shell
# Ubuntu/Debian
sudo apt update
sudo apt install openssl
This library will allow you to build an entire billing logic from scratch, even the most complex one. Lago is a real-time event-based library made for usage-based billing, subscription-based billing, and all the nuances of pricing in between.
# MAC OS
brew install openssl
```
## Documentation
## Local Environment Setup
The official Lago documentation is available here : https://doc.getlago.com
- First of all, you need to clone the Lago repo on your machine, since we're using Git submodules, here is the good command to do it
```shell
git clone --recurse-submodules git@github.com:getlago/lago.git
cd lago
## Contributing
# If you're not using bash, replace .bashrc with your shell rc, ei: ~/.zshrc
echo "export LAGO_PATH=${PWD}" >> ~/.bashrc
echo 'alias lago="docker-compose -f $LAGO_PATH/docker-compose.dev.yml"' >> ~/.bashrc
source ~/.bashrc
```
TODO
- Install `mkcert` and generate some certs for TLS usage
```shell
brew install mkcert nss
mkcert -install
cd $LAGO_PATH/traefik
mkdir certs
cd certs
mkcert -cert-file lago.dev.pem -key-file lago.dev-key.pem lago.dev "*.lago.dev"
```
## Development Environment
- Add all custom domains to your `/etc/hosts` file
```
127.0.0.1 traefik.lago.dev
127.0.0.1 api.lago.dev
127.0.0.1 app.lago.dev
```
Check the wiki [guide](https://github.com/getlago/lago/wiki/Development-Environment)
- Setup API
## License
```shell
cp ./api/.env.dist ./api/.env
touch ./api/config/master.key
```
Populate the `./api/config/master.key` file with the value from [1Password](https://start.1password.com/open/i?a=CV2K6WPYLZBXXGIKIUYUJOA3Z4&v=4k453pfxong4lipf3oookha7ei&i=kc2v2trpahmnzcl5k3krdl2z3y&h=my.1password.com).
## Local Environment Commands
- Start your local environment
```shell
lago up -d db redis traefik
lago up front api
```
- Start enjoying your local Lago at https://app.lago.dev
## Update your local copie of the code
```shell
git pull --recurse-submodules
```
Lago is open-source under the GNU Affero General Public License Version 3 (AGPLv3) or any later version.