Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getlago/lago
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.19.1
Choose a base ref
...
head repository: getlago/lago
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jan 23, 2025

  1. Copy the full SHA
    16c8b68 View commit details
  2. Copy the full SHA
    91e18ef View commit details
  3. Copy the full SHA
    84b6eef View commit details

Commits on Jan 24, 2025

  1. Copy the full SHA
    5224c83 View commit details
  2. Merge pull request #457 from getlago/v-1-19-1

    misc: Bump version to v1.19.1
    annvelents authored Jan 24, 2025
    Copy the full SHA
    52bd5d7 View commit details

Commits on Jan 27, 2025

  1. Copy the full SHA
    1397f67 View commit details

Commits on Jan 28, 2025

  1. Add LAGO_LICENSE_URL

    julienbourdeau committed Jan 28, 2025
    Copy the full SHA
    16eb537 View commit details

Commits on Jan 29, 2025

  1. Merge pull request #455 from getlago/feat/improv-dev-env

    feat(docker): Use .env files for dev environment
    julienbourdeau authored Jan 29, 2025
    Copy the full SHA
    0a67ac0 View commit details
  2. Copy the full SHA
    75f451d View commit details

Commits on Jan 30, 2025

  1. chore(docker-compose): Simplify docker compose file (#452)

    * chore(docker-compose): ease the usage of the docker compose file
    
    * add some other variables
    
    * some cleanup
    
    * add email env vars
    
    * add docker compose CI
    
    * update worker healthcheck
    
    * fix ci
    jdenquin authored Jan 30, 2025
    Copy the full SHA
    6a1c26d View commit details

Commits on Jan 31, 2025

  1. Copy the full SHA
    487330a View commit details

Commits on Feb 3, 2025

  1. misc: Ignore zed files

    rsempe committed Feb 3, 2025
    Copy the full SHA
    7c5a0c6 View commit details
  2. Copy the full SHA
    37fdd04 View commit details

Commits on Feb 7, 2025

  1. Merge pull request #461 from getlago/data/connection

    feat(data): Add LAGO_DATA_API_URL env variable
    rsempe authored Feb 7, 2025
    Copy the full SHA
    1ce4fbe View commit details

Commits on Feb 11, 2025

  1. Copy the full SHA
    85a91cc View commit details
  2. Merge pull request #463 from getlago/data/api-bearer-token

    feat(data): Add LAGO_DATA_API_BEARER_TOKEN to environment.default
    rsempe authored Feb 11, 2025
    Copy the full SHA
    1d5333a View commit details

Commits on Feb 12, 2025

  1. Copy the full SHA
    cc70c2e View commit details
  2. feat(docker): Single docker image (#464)

    * add a new docker image
    
    * add api
    
    * add pg, redis and foreman
    
    * add ga
    
    * tag with latest
    
    * update api
    
    * right tag on submodules
    
    * use one run
    jdenquin authored Feb 12, 2025
    Copy the full SHA
    52ab3b3 View commit details
  3. Copy the full SHA
    023bfe1 View commit details
  4. Copy the full SHA
    c91af2b View commit details

Commits on Feb 13, 2025

  1. Copy the full SHA
    a41c6dc View commit details

Commits on Feb 18, 2025

  1. Merge pull request #469 from getlago/misc/lago-license-url

    misc: Remove useless env variable LAGO_LICENSE_URL
    rsempe authored Feb 18, 2025
    Copy the full SHA
    b88e385 View commit details

Commits on Feb 25, 2025

  1. Copy the full SHA
    98bbacf View commit details

Commits on Feb 26, 2025

  1. Copy the full SHA
    a2f6e71 View commit details
  2. Copy the full SHA
    99354e5 View commit details

Commits on Mar 5, 2025

  1. Copy the full SHA
    f5c340a View commit details

Commits on Mar 7, 2025

  1. Copy the full SHA
    6dd7e56 View commit details
Showing with 608 additions and 565 deletions.
  1. +55 −0 .env.development.default
  2. +34 −0 .github/workflows/docker-ci.yml
  3. +118 −0 .github/workflows/release-docker-image.yml
  4. +2 −0 .gitignore
  5. +1 −1 api
  6. +23 −271 docker-compose.dev.yml
  7. +94 −292 docker-compose.yml
  8. +67 −0 docker/Dockerfile
  9. +3 −0 docker/Procfile
  10. +37 −0 docker/README.md
  11. +12 −0 docker/nginx.conf
  12. +75 −0 docker/redis.conf
  13. +72 −0 docker/runner.sh
  14. +1 −1 front
  15. +7 −0 scripts/bootstrap.sh
  16. +7 −0 scripts/pg-init-scripts/bootstrap.sh
55 changes: 55 additions & 0 deletions .env.development.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
LAGO_API_URL=https://api.lago.dev
LAGO_FRONT_URL=https://app.lago.dev

# Feature flags
LAGO_SIDEKIQ_WEB=true
LAGO_CLICKHOUSE_ENABLED=true
LAGO_CLICKHOUSE_MIGRATIONS_ENABLED=true
LAGO_DISABLE_SEGMENT=true
LAGO_DISABLE_WALLET_REFRESH=true
LAGO_USE_AWS_S3=false

# DB Seeding
LAGO_CREATE_ORG=true
LAGO_ORG_USER_EMAIL=email@example.com
LAGO_ORG_USER_PASSWORD=password
LAGO_ORG_NAME=Acme

# Accessories (DB, pdf, kafka)
POSTGRES_USER=lago
POSTGRES_DB=lago
POSTGRES_PASSWORD=changeme
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
REDIS_URL=redis://redis:6379
LAGO_REDIS_CACHE_URL=redis://redis:6379
LAGO_PDF_URL=http://pdf:3000
LAGO_DATA_API_URL=http://data_api
LAGO_KAFKA_BOOTSTRAP_SERVERS=redpanda:9092
LAGO_KAFKA_RAW_EVENTS_TOPIC=events-raw
LAGO_KAFKA_ENRICHED_EVENTS_TOPIC=events_enriched
LAGO_KAFKA_CLICKHOUSE_CONSUMER_GROUP=clickhouse

# Misc
LAGO_FROM_EMAIL=noreply@getlago.com
LAGO_PARALLEL_THREADS_COUNT=4

# Use dedicated services to process certain queues
# If you enable one, make sure the related service is started
# Ex: SIDEKIQ_WEBHOOK=true means `api-webhook-worker` must be running or webhooks-related jobs won't be processed
SIDEKIQ_EVENTS=false
SIDEKIQ_PDFS=false
SIDEKIQ_BILLING=false
SIDEKIQ_CLOCK=false
SIDEKIQ_WEBHOOK=false

# External API keys
LAGO_DATA_API_BEARER_TOKEN=changeme
LAGO_LICENSE=
NANGO_SECRET_KEY=
SEGMENT_WRITE_KEY=

# Salts and similar
SECRET_KEY_BASE=your-secret-key-base-hex-64
LAGO_ENCRYPTION_PRIMARY_KEY=your-encrpytion-primary-key
LAGO_ENCRYPTION_DETERMINISTIC_KEY=your-encrpytion-deterministic-key
LAGO_ENCRYPTION_KEY_DERIVATION_SALT=your-encrpytion-derivation-salt
34 changes: 34 additions & 0 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Docker CI"
on:
push:
branches:
- main
workflow_dispatch:
jobs:
docker-ci:
name: Docker CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
docker-compose.yml
- name: Launch all services with default configuration
env:
LAGO_CREATE_ORG: "true"
LAGO_ORG_NAME: "Lago"
LAGO_ORG_USER_EMAIL: "foo@bar.com"
LAGO_ORG_USER_PASSWORD: "foobar"
LAGO_ORG_API_KEY: "test"
run: |
export LAGO_RSA_PRIVATE_KEY="`openssl genrsa 2048 | base64 | tr -d '\n'`"
docker compose up -d --wait
- name: cURL API
run: curl -f http://localhost:3000/health
- name: cURL Front
run: curl -f http://localhost:80
- name: cURL API Customers
run: |
curl -f http://localhost:3000/api/v1/customers -H "Authorization: Bearer test"
- name: Down services
run: docker compose down
118 changes: 118 additions & 0 deletions .github/workflows/release-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: "Release Single Docker Image"
on:
release:
types: [released]
workflow_dispatch:
inputs:
version:
description: Version
required: true
env:
REGISTRY_IMAGE: getlago/lago
jobs:
build-single-docker-image:
strategy:
matrix:
platform:
- version: linux/amd64
runner: linux/amd64
- version: linux/arm64
runner: linux-arm64
name: Build ${{ matrix.platform.version }} Image
runs-on: ${{ matrix.platform.runner }}
steps:
- name: Prepare
run: |
platform=${{ matrix.platform.version }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
submodules: true
- name: Docker Meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=raw,value=${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.version }}
type=raw,value=latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Log In to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Add version into docker image
id: add_version
run: |
echo "${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.version }}" > LAGO_VERSION
- name: Build and push Docker image
uses: docker/build-push-action@v6
id: build
with:
context: .
file: ./docker/Dockerfile
platforms: ${{ matrix.platform.version }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
build-args: |
SEGMENT_WRITE_KEY=${{ secrets.SEGMENT_WRITE_KEY }}
- name: Export Digest
run: |
mkdir -p ./_tmp/${{ github.run_id }}/${{ github.run_attempt }}/digests
digest="${{ steps.build.outputs.digest }}"
touch "./_tmp/${{ github.run_id }}/${{ github.run_attempt }}/digests/${digest#sha256:}"
- name: Upload Digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ env.PLATFORM_PAIR }}
path: ./_tmp/${{ github.run_id }}/${{ github.run_attempt }}/digests/*
if-no-files-found: error
retention-days: 1
- name: Clean up
if: always()
run: |
[ -e ./_tmp/${{ github.run_id }}/${{ github.run_attempt }}/digests ] && \
rm -rf ./_tmp/${{ github.run_id }}/${{ github.run_attempt }}/digests
merge:
name: Merge Images
runs-on: lago-runner
needs: [build-single-docker-image]
steps:
- name: Download Digests
uses: actions/download-artifact@v4
with:
path: ./_tmp/${{ github.run_id}}/${{ github.run_attempt }}/digests
pattern: digests-*
merge-multiple: true
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=raw,value=${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.version }}
type=raw,value=latest
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Create manifest and push
working-directory: ./_tmp/${{ github.run_id }}/${{ github.run_attempt}}/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect Image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
- name: Clean up
if: always()
run: |
[ -e ./_tmp/${{ github.run_id }}/${{ github.run_attempt }}/digests ] && \
rm -rf ./_tmp/${{ github.run_id }}/${{ github.run_attempt }}/digests
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
*.code-workspace
.DS_Store
.env
.env.development
.rsa_private.pem
.vscode
.zed
/extra/ssl/certbot
/extra/ssl/dhparam.pem
/extra/ssl/nginx*
2 changes: 1 addition & 1 deletion api
Submodule api updated 2544 files
Loading