diff --git a/config/api.env b/config/api.env new file mode 100644 index 0000000..cd63ea4 --- /dev/null +++ b/config/api.env @@ -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 diff --git a/config/minio.env b/config/minio.env new file mode 100644 index 0000000..1f2ae01 --- /dev/null +++ b/config/minio.env @@ -0,0 +1,2 @@ +MINIO_ROOT_USER=lago +MINIO_ROOT_PASSWORD=changeme diff --git a/docker-compose.yml b/docker-compose.yml index aaa46e3..e9fe016 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,17 +8,9 @@ services: image: postgres:14-alpine container_name: lago_db restart: unless-stopped - environment: - 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 + env_file: ./config/postgres.env volumes: - lago_postgres_data:/data/postgres - ports: - - ${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432} healthcheck: test: ["CMD-SHELL", "pg_isready -U lago"] interval: 5s @@ -29,11 +21,8 @@ services: image: redis:6-alpine container_name: lago_redis restart: unless-stopped - command: --port ${REDIS_PORT:-6379} volumes: - lago_redis_data:/data - ports: - - ${REDIS_PORT:-6379}:${REDIS_PORT:-6379} healthcheck: test: ["CMD-SHELL", "redis-cli", "ping"] interval: 5s @@ -44,14 +33,9 @@ services: image: quay.io/minio/minio container_name: lago_minio command: server /data --console-address ":9001" - expose: - - 9000 - - 9001 volumes: - lago_storage_data:/data - environment: - - MINIO_ROOT_USER=lago - - MINIOT_ROOT_PASSWORD=changeme + env_file: ./config/minio.env healthcheck: test: ["CMD", "mc", "ready", "local"] interval: 5s