Skip to content

Configuration

Pricore is configured through environment variables in your .env file.

Essential Configuration

Application Settings

bash
APP_NAME=Pricore
APP_ENV=production
APP_DEBUG=false
APP_URL=https://pricore.yourcompany.com
VariableDescriptionDefault
APP_NAMEApplication name displayed in UIPricore
APP_ENVEnvironment (local, production)production
APP_DEBUGEnable debug mode (disable in production)false
APP_URLPublic URL of your Pricore instance-

Registration

bash
SIGN_UP_ENABLED=false
VariableDescriptionDefault
SIGN_UP_ENABLEDAllow public registration without an invitationfalse

By default, registration is invite-only. Users can only create accounts after receiving an organization invitation. Set SIGN_UP_ENABLED=true to allow anyone to register.

Database Configuration

Pricore supports SQLite, MySQL, and PostgreSQL:

bash
DB_CONNECTION=sqlite
DB_DATABASE=/path/to/database.sqlite
bash
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pricore
DB_USERNAME=pricore
DB_PASSWORD=secret
bash
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=pricore
DB_USERNAME=pricore
DB_PASSWORD=secret

Redis Configuration

Redis is required for queues, caching, and sessions:

bash
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=null

QUEUE_CONNECTION=redis
CACHE_STORE=redis
SESSION_DRIVER=redis

Git Provider Configuration

To sync packages from Git repositories, configure your provider credentials.

GitHub

bash
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
GITHUB_REDIRECT_URI=${APP_URL}/auth/github/callback
VariableDescriptionDefault
GITHUB_CLIENT_IDGitHub OAuth App client ID-
GITHUB_CLIENT_SECRETGitHub OAuth App client secret-
GITHUB_REDIRECT_URIOAuth callback URL{APP_URL}/auth/github/callback

Create a GitHub OAuth App:

  1. Go to GitHub Settings > Developer settings > OAuth Apps
  2. Click "New OAuth App"
  3. Set the callback URL to {APP_URL}/auth/github/callback

GitLab

bash
GITLAB_CLIENT_ID=your-gitlab-client-id
GITLAB_CLIENT_SECRET=your-gitlab-client-secret
GITLAB_REDIRECT_URI=${APP_URL}/auth/gitlab/callback
GITLAB_INSTANCE_URI=https://gitlab.com  # or your self-hosted GitLab URL
VariableDescriptionDefault
GITLAB_CLIENT_IDGitLab OAuth Application ID-
GITLAB_CLIENT_SECRETGitLab OAuth Application secret-
GITLAB_REDIRECT_URIOAuth callback URL{APP_URL}/auth/gitlab/callback
GITLAB_INSTANCE_URIGitLab instance URL (for self-hosted)https://gitlab.com

Create a GitLab OAuth Application:

GitLab.com:

  1. Go to GitLab User Settings > Applications
  2. Click "Add new application"
  3. Set the Redirect URI to {APP_URL}/auth/gitlab/callback
  4. Select scopes: read_user and api
    • read_user — used for login/sign-up (reading user profile and email)
    • api — used when connecting GitLab as a git credential (reading repositories, file content, and managing webhooks). GitLab does not offer a narrower scope for webhook management.
  5. Click "Save application" and copy the Application ID and Secret

Self-hosted GitLab:

  1. Go to your GitLab instance > User Settings > Applications
  2. Follow the same steps as above
  3. Set GITLAB_INSTANCE_URI to your instance URL (e.g., https://gitlab.example.com/)

Mail Configuration

Configure mail for password resets and notifications:

bash
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=your-username
MAIL_PASSWORD=your-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply@yourcompany.com
MAIL_FROM_NAME="${APP_NAME}"

Horizon (Queue Dashboard)

Pricore uses Laravel Horizon to manage queue workers. The following variables configure the Horizon dashboard:

bash
HORIZON_ALLOWED_EMAILS=admin@yourcompany.com,ops@yourcompany.com
HORIZON_PATH=horizon
VariableDescriptionDefault
HORIZON_ALLOWED_EMAILSComma-separated list of emails allowed to access the Horizon dashboard (in non-local environments)'' (empty)
HORIZON_NAMEName displayed in the Horizon UI and notifications-
HORIZON_DOMAINSubdomain to serve Horizon from (e.g., horizon.yourcompany.com)null (same domain)
HORIZON_PATHURI path for the Horizon dashboardhorizon
HORIZON_PREFIXRedis key prefix for Horizon data{app_name}_horizon:

Slack Notifications

To send notifications to Slack, configure a bot token:

bash
SLACK_BOT_USER_OAUTH_TOKEN=xoxb-your-bot-token
SLACK_BOT_USER_DEFAULT_CHANNEL=#packages
VariableDescriptionDefault
SLACK_BOT_USER_OAUTH_TOKENSlack bot user OAuth token-
SLACK_BOT_USER_DEFAULT_CHANNELDefault Slack channel for notifications-

Error Tracking (Sentry)

Pricore supports Sentry for error tracking and performance monitoring:

bash
SENTRY_LARAVEL_DSN=https://examplePublicKey@o0.ingest.sentry.io/0
SENTRY_ENVIRONMENT=production
SENTRY_TRACES_SAMPLE_RATE=0.2
VariableDescriptionDefault
SENTRY_LARAVEL_DSNSentry DSN URL (falls back to SENTRY_DSN)-
SENTRY_RELEASERelease version tag sent to Sentry-
SENTRY_ENVIRONMENTEnvironment name in SentryAPP_ENV value
SENTRY_SAMPLE_RATEError event sample rate (0.0 to 1.0)1.0
SENTRY_TRACES_SAMPLE_RATEPerformance traces sample rate (0.0 to 1.0)null (disabled)
SENTRY_PROFILES_SAMPLE_RATEProfiling sample rate (0.0 to 1.0)null (disabled)
SENTRY_ENABLE_LOGSSend logs to Sentryfalse
SENTRY_LOG_LEVELMinimum log level sent to Sentrydebug
SENTRY_SEND_DEFAULT_PIIInclude personally identifiable informationfalse

Security Settings

Trusted Proxies

When running behind a load balancer or reverse proxy, configure trusted proxies:

bash
TRUSTED_PROXIES=192.168.1.0/24,10.0.0.0/8
VariableDescriptionDefault
TRUSTED_PROXIESComma-separated list of trusted proxy IP addresses or CIDR ranges. Use * to trust all proxies.'' (empty)

Two-Factor Authentication

Two-factor authentication is enabled by default. Users can enable it in their account settings.

Session Security

bash
SESSION_LIFETIME=120  # minutes
SESSION_SECURE_COOKIE=true  # require HTTPS

Performance Tuning

Queue Workers

For production, use Laravel Horizon to manage queue workers:

bash
# Horizon is included and configured by default
php artisan horizon

Caching

Enable config and route caching for production:

bash
php artisan config:cache
php artisan route:cache
php artisan view:cache

Complete Example

Here's a complete production .env example:

bash
APP_NAME=Pricore
APP_ENV=production
APP_KEY=base64:your-generated-key
APP_DEBUG=false
APP_URL=https://pricore.yourcompany.com

SIGN_UP_ENABLED=false

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=pricore
DB_USERNAME=pricore
DB_PASSWORD=secure-password

REDIS_HOST=127.0.0.1
REDIS_PORT=6379

CACHE_STORE=redis
SESSION_DRIVER=redis
QUEUE_CONNECTION=redis

MAIL_MAILER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=postmaster@yourcompany.com
MAIL_PASSWORD=your-mail-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=packages@yourcompany.com
MAIL_FROM_NAME="${APP_NAME}"

GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret

GITLAB_CLIENT_ID=your-gitlab-client-id
GITLAB_CLIENT_SECRET=your-gitlab-client-secret
# GITLAB_INSTANCE_URI=https://gitlab.example.com  # uncomment for self-hosted

HORIZON_ALLOWED_EMAILS=admin@yourcompany.com

SENTRY_LARAVEL_DSN=https://examplePublicKey@o0.ingest.sentry.io/0

TRUSTED_PROXIES=

Released under the Apache 2.0 License.