add new env files

This commit is contained in:
Jeremy Denquin 2024-08-19 15:35:08 +02:00
parent a1845658c4
commit 1a5e5e5e23
3 changed files with 38 additions and 18 deletions

34
config/api.env Normal file
View File

@ -0,0 +1,34 @@
LAGO_API_URL=http://localhost:3000
DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-lago}?search_path=${POSTGRES_SCHEMA:-public}
REDIS_URL=redis://${REDIS_HOST:-redis}:${REDIS_PORT:-6379}
REDIS_PASSWORD=${REDIS_PASSWORD}
SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
RAILS_ENV=production
RAILS_LOG_TO_STDOUT=true
SENTRY_DSN=${SENTRY_DSN}
LAGO_FRONT_URL=http://localhost
RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
LAGO_RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
LAGO_SIDEKIQ_WEB=${LAGO_SIDEKIQ_WEB}
ENCRYPTION_PRIMARY_KEY=${LAGO_ENCRYPTION_PRIMARY_KEY:-your-encryption-primary-key}
ENCRYPTION_DETERMINISTIC_KEY=${LAGO_ENCRYPTION_DETERMINISTIC_KEY:-your-encryption-deterministic-key}
ENCRYPTION_KEY_DERIVATION_SALT=${LAGO_ENCRYPTION_KEY_DERIVATION_SALT:-your-encryption-derivation-salt}
LAGO_USE_AWS_S3=${LAGO_USE_AWS_S3:-false}
LAGO_AWS_S3_ACCESS_KEY_ID=${LAGO_AWS_S3_ACCESS_KEY_ID:-azerty123456}
LAGO_AWS_S3_SECRET_ACCESS_KEY=${LAGO_AWS_S3_SECRET_ACCESS_KEY:-azerty123456}
LAGO_AWS_S3_REGION=${LAGO_AWS_S3_REGION:-us-east-1}
LAGO_AWS_S3_BUCKET=${LAGO_AWS_S3_BUCKET:-bucket}
LAGO_AWS_S3_ENDPOINT=${LAGO_AWS_S3_ENDPOINT}
LAGO_USE_GCS=${LAGO_USE_GCS:-false}
LAGO_GCS_PROJECT=${LAGO_GCS_PROJECT:-}
LAGO_GCS_BUCKET=${LAGO_GCS_BUCKET:-}
LAGO_PDF_URL=${LAGO_PDF_URL:-http://pdf:3000}
LAGO_REDIS_CACHE_URL=redis://${LAGO_REDIS_CACHE_HOST:-redis}:${LAGO_REDIS_CACHE_PORT:-6379}
LAGO_REDIS_CACHE_PASSWORD=${LAGO_REDIS_CACHE_PASSWORD}
LAGO_DISABLE_SEGMENT=${LAGO_DISABLE_SEGMENT}
LAGO_DISABLE_WALLET_REFRESH=${LAGO_DISABLE_WALLET_REFRESH}
LAGO_OAUTH_PROXY_URL=https://proxy.getlago.com
LAGO_LICENSE=${LAGO_LICENSE:-}
NANGO_SECRET_KEY=${NANGO_SECRET_KEY}
SIDEKIQ_EVENTS=true
SIDEKIQ_PDFS=true

2
config/minio.env Normal file
View File

@ -0,0 +1,2 @@
MINIO_ROOT_USER=lago
MINIO_ROOT_PASSWORD=changeme

View File

@ -8,17 +8,9 @@ services:
image: postgres:14-alpine image: postgres:14-alpine
container_name: lago_db container_name: lago_db
restart: unless-stopped restart: unless-stopped
environment: env_file: ./config/postgres.env
POSTGRES_DB: ${POSTGRES_DB:-lago}
POSTGRES_USER: ${POSTGRES_USER:-lago}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
PGDATA: /data/postgres
PGPORT: ${POSTGRES_PORT:-5432}
POSTGRES_SCHEMA: public
volumes: volumes:
- lago_postgres_data:/data/postgres - lago_postgres_data:/data/postgres
ports:
- ${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U lago"] test: ["CMD-SHELL", "pg_isready -U lago"]
interval: 5s interval: 5s
@ -29,11 +21,8 @@ services:
image: redis:6-alpine image: redis:6-alpine
container_name: lago_redis container_name: lago_redis
restart: unless-stopped restart: unless-stopped
command: --port ${REDIS_PORT:-6379}
volumes: volumes:
- lago_redis_data:/data - lago_redis_data:/data
ports:
- ${REDIS_PORT:-6379}:${REDIS_PORT:-6379}
healthcheck: healthcheck:
test: ["CMD-SHELL", "redis-cli", "ping"] test: ["CMD-SHELL", "redis-cli", "ping"]
interval: 5s interval: 5s
@ -44,14 +33,9 @@ services:
image: quay.io/minio/minio image: quay.io/minio/minio
container_name: lago_minio container_name: lago_minio
command: server /data --console-address ":9001" command: server /data --console-address ":9001"
expose:
- 9000
- 9001
volumes: volumes:
- lago_storage_data:/data - lago_storage_data:/data
environment: env_file: ./config/minio.env
- MINIO_ROOT_USER=lago
- MINIOT_ROOT_PASSWORD=changeme
healthcheck: healthcheck:
test: ["CMD", "mc", "ready", "local"] test: ["CMD", "mc", "ready", "local"]
interval: 5s interval: 5s