mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
327 lines
16 KiB
Bash
327 lines
16 KiB
Bash
#### Part-DB Configuration
|
|
# See https://docs.part-db.de/configuration.html for documentation of available options
|
|
|
|
###################################################################################
|
|
# Database settings
|
|
###################################################################################
|
|
|
|
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
|
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
|
|
|
|
# Use a file (SQLite) as database. For bigger instances you should use a real database server (like MySQL)
|
|
DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db"
|
|
|
|
# Uncomment this line (and comment the line above to use a MySQL database
|
|
#DATABASE_URL=mysql://root:@127.0.0.1:3306/part-db?serverVersion=5.7
|
|
|
|
# Set this value to 1, if you want to use SSL to connect to the MySQL server. It will be tried to use the CA certificate
|
|
# otherwise a CA bundle shipped with PHP will be used.
|
|
# Leave it at 0, if you do not want to use SSL or if your server does not support it
|
|
DATABASE_MYSQL_USE_SSL_CA=0
|
|
|
|
# Set this value to 0, if you don't want to verify the CA certificate of the MySQL server
|
|
# Only do this, if you know what you are doing!
|
|
DATABASE_MYSQL_SSL_VERIFY_CERT=1
|
|
|
|
# Emulate natural sorting of strings even on databases that do not support it (like SQLite, MySQL or MariaDB < 10.7)
|
|
# This can be slow on big databases and might have some problems and quirks, so use it with caution
|
|
DATABASE_EMULATE_NATURAL_SORT=0
|
|
|
|
###################################################################################
|
|
# General settings
|
|
###################################################################################
|
|
|
|
# The language to use serverwide as default (en, de, ru, etc.)
|
|
DEFAULT_LANG="en"
|
|
# The default timezone to use serverwide (e.g. Europe/Berlin)
|
|
DEFAULT_TIMEZONE="Europe/Berlin"
|
|
# The currency that is used inside the DB (and is assumed when no currency is set). This can not be changed later, so be sure to set it the currency used in your country
|
|
BASE_CURRENCY="EUR"
|
|
# The name of this installation. This will be shown as title in the browser and in the header of the website
|
|
INSTANCE_NAME="Part-DB"
|
|
# Allow users to download attachments to the server by providing an URL
|
|
# This could be a potential security issue, as the user can retrieve any file the server has access to (via internet)
|
|
ALLOW_ATTACHMENT_DOWNLOADS=0
|
|
# Set this to 1, if the "download external files" checkbox should be checked by default for new attachments
|
|
ATTACHMENT_DOWNLOAD_BY_DEFAULT=0
|
|
# Use gravatars for user avatars, when user has no own avatar defined
|
|
USE_GRAVATAR=0
|
|
# The maximum allowed size for attachment files in bytes (you can use M for megabytes and G for gigabytes)
|
|
# Please note that the php.ini setting upload_max_filesize also limits the maximum size of uploaded files
|
|
MAX_ATTACHMENT_FILE_SIZE="100M"
|
|
|
|
# The public reachable URL of this Part-DB installation. This is used for generating links in SAML and email templates
|
|
# This must end with a slash!
|
|
DEFAULT_URI="https://partdb.changeme.invalid/"
|
|
|
|
# With this option you can configure, where users are enforced to give a change reason, which will be logged
|
|
# This is a comma separated list of values, see documentation for available values
|
|
# Leave this empty, to make all change reasons optional
|
|
ENFORCE_CHANGE_COMMENTS_FOR=""
|
|
|
|
# Disable that if you do not want that Part-DB connects to GitHub to check for available updates, or if your server can not connect to the internet
|
|
CHECK_FOR_UPDATES=1
|
|
|
|
###################################################################################
|
|
# Email settings
|
|
###################################################################################
|
|
|
|
# The DSN of the email server that should be used for sending emails (disabled by default)
|
|
# See Transport section of https://symfony.com/doc/current/components/mailer.html for available providers and syntax
|
|
MAILER_DSN=null://null
|
|
#MAILER_DSN=smtp://user:password@smtp.mailserver.invalid:587
|
|
|
|
# The email address from which all Part-DB emails should be sent. Change this when you configure email!
|
|
EMAIL_SENDER_EMAIL=noreply@partdb.changeme
|
|
# The sender name which should be used for all Part-DB emails
|
|
EMAIL_SENDER_NAME="Part-DB Mailer"
|
|
# Set this to 1 to allow reset of a password per email
|
|
ALLOW_EMAIL_PW_RESET=0
|
|
|
|
######################################################################################
|
|
# History/Eventlog settings
|
|
######################################################################################
|
|
# If you want to use full timetrave functionality all values below have to be set to 1
|
|
|
|
# Save which fields were changed in a ElementEdited log entry
|
|
HISTORY_SAVE_CHANGED_FIELDS=1
|
|
# Save the old data in the ElementEdited log entry (warning this could increase the database size in short time)
|
|
HISTORY_SAVE_CHANGED_DATA=1
|
|
# Save the data of an element that gets removed into log entry. This allows to undelete an element
|
|
HISTORY_SAVE_REMOVED_DATA=1
|
|
# Save the new data of an element that gets changed or added. This allows an easy comparison of the old and new data on the detail page
|
|
# This option only becomes active when HISTORY_SAVE_CHANGED_DATA is set to 1
|
|
HISTORY_SAVE_NEW_DATA=1
|
|
|
|
###################################################################################
|
|
# Error pages settings
|
|
###################################################################################
|
|
|
|
# You can set an email address here, which is shown on an error page, how to contact an administrator
|
|
ERROR_PAGE_ADMIN_EMAIL=''
|
|
# If this is set to true, solutions to common problems are shown on error pages. Disable this, if you do not want your users to see them...
|
|
ERROR_PAGE_SHOW_HELP=1
|
|
|
|
##################################################################################
|
|
# Part table settings
|
|
##################################################################################
|
|
|
|
# The default page size for the part table (set to -1 to show all parts on one page)
|
|
TABLE_DEFAULT_PAGE_SIZE=50
|
|
# Configure which columns will be visible by default in the parts table (and in which order).
|
|
# This is a comma separated list of column names. See documentation for available values.
|
|
TABLE_PARTS_DEFAULT_COLUMNS=name,description,category,footprint,manufacturer,storage_location,amount
|
|
|
|
##################################################################################
|
|
# Info provider settings
|
|
##################################################################################
|
|
|
|
# Digikey Provider:
|
|
# You can get your client id and secret from https://developer.digikey.com/
|
|
PROVIDER_DIGIKEY_CLIENT_ID=
|
|
PROVIDER_DIGIKEY_SECRET=
|
|
# The currency to get prices in
|
|
PROVIDER_DIGIKEY_CURRENCY=EUR
|
|
# The language to get results in (en, de, fr, it, es, zh, ja, ko)
|
|
PROVIDER_DIGIKEY_LANGUAGE=en
|
|
# The country to get results for
|
|
PROVIDER_DIGIKEY_COUNTRY=DE
|
|
|
|
# Farnell Provider:
|
|
# You can get your API key from https://partner.element14.com/
|
|
PROVIDER_ELEMENT14_KEY=
|
|
# Configure the store domain you want to use. This decides the language and currency of results. You can get a list of available stores from https://partner.element14.com/docs/Product_Search_API_REST__Description
|
|
PROVIDER_ELEMENT14_STORE_ID=de.farnell.com
|
|
|
|
# TME Provider:
|
|
# You can get your API key from https://developers.tme.eu/en/
|
|
PROVIDER_TME_KEY=
|
|
PROVIDER_TME_SECRET=
|
|
# The currency to get prices in
|
|
PROVIDER_TME_CURRENCY=EUR
|
|
# The language to get results in (en, de, pl)
|
|
PROVIDER_TME_LANGUAGE=en
|
|
# The country to get results for
|
|
PROVIDER_TME_COUNTRY=DE
|
|
# [DEPRECATED] Set this to 1 to get gross prices (including VAT) instead of net prices
|
|
# With private API keys, this option cannot be used anymore is ignored by Part-DB. The VAT inclusion depends on your TME account settings.
|
|
PROVIDER_TME_GET_GROSS_PRICES=1
|
|
|
|
# Octopart / Nexar Provider:
|
|
# You can get your API key from https://nexar.com/api
|
|
PROVIDER_OCTOPART_CLIENT_ID=
|
|
PROVIDER_OCTOPART_SECRET=
|
|
# The currency and country to get prices for (you have to set both to get meaningful results)
|
|
# 3 letter ISO currency code (e.g. EUR, USD, GBP)
|
|
PROVIDER_OCTOPART_CURRENCY=EUR
|
|
# 2 letter ISO country code (e.g. DE, US, GB)
|
|
PROVIDER_OCTOPART_COUNTRY=DE
|
|
# The number of results to get from Octopart while searching (please note that this counts towards your API limits)
|
|
PROVIDER_OCTOPART_SEARCH_LIMIT=10
|
|
# Set to false to include non authorized offers in the results
|
|
PROVIDER_OCTOPART_ONLY_AUTHORIZED_SELLERS=1
|
|
|
|
# Mouser Provider API V2:
|
|
# You can get your API key from https://www.mouser.it/api-hub/
|
|
PROVIDER_MOUSER_KEY=
|
|
# Filter search results by RoHS compliance and stock availability:
|
|
# Available options: None | Rohs | InStock | RohsAndInStock
|
|
PROVIDER_MOUSER_SEARCH_OPTION='None'
|
|
# The number of results to get from Mouser while searching (please note that this value is max 50)
|
|
PROVIDER_MOUSER_SEARCH_LIMIT=50
|
|
# It is recommended to leave this set to 'true'. The option is not really good doumented by Mouser:
|
|
# Used when searching for keywords in the language specified when you signed up for Search API.
|
|
PROVIDER_MOUSER_SEARCH_WITH_SIGNUP_LANGUAGE='true'
|
|
|
|
# LCSC Provider:
|
|
# LCSC does not provide an offical API, so this used the API LCSC uses to render their webshop.
|
|
# LCSC did not intended the use of this API and it could break any time, so use it at your own risk.
|
|
|
|
# We dont require an API key for LCSC, just set this to 1 to enable LCSC support
|
|
PROVIDER_LCSC_ENABLED=0
|
|
# The currency to get prices in (e.g. EUR, USD, etc.)
|
|
PROVIDER_LCSC_CURRENCY=EUR
|
|
|
|
# Oemsecrets Provider API 3.0.1:
|
|
# You can get your API key from https://www.oemsecrets.com/api
|
|
PROVIDER_OEMSECRETS_KEY=
|
|
# The country you want the output for
|
|
PROVIDER_OEMSECRETS_COUNTRY_CODE=DE
|
|
# Available country code are:
|
|
# AD, AE, AQ, AR, AT, AU, BE, BO, BR, BV, BY, CA, CH, CL, CN, CO, CZ, DE, DK, EC, EE, EH,
|
|
# ES, FI, FK, FO, FR, GB, GE, GF, GG, GI, GL, GR, GS, GY, HK, HM, HR, HU, IE, IM, IN, IS,
|
|
# IT, JM, JP, KP, KR, KZ, LI, LK, LT, LU, MC, MD, ME, MK, MT, NL, NO, NZ, PE, PH, PL, PT,
|
|
# PY, RO, RS, RU, SB, SD, SE, SG, SI, SJ, SK, SM, SO, SR, SY, SZ, TC, TF, TG, TH, TJ, TK,
|
|
# TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VE, VG, VI, VN, VU, WF, YE,
|
|
# ZA, ZM, ZW
|
|
#
|
|
# The currency you want the prices to be displayed in
|
|
PROVIDER_OEMSECRETS_CURRENCY=EUR
|
|
# Available currency are:AUD, CAD, CHF, CNY, DKK, EUR, GBP, HKD, ILS, INR, JPY, KRW, NOK,
|
|
# NZD, RUB, SEK, SGD, TWD, USD
|
|
#
|
|
# If PROVIDER_OEMSECRETS_ZERO_PRICE is set to 0, distributors with zero prices
|
|
# will be discarded from the creation of a new part (set to 1 otherwise)
|
|
PROVIDER_OEMSECRETS_ZERO_PRICE=0
|
|
#
|
|
# When PROVIDER_OEMSECRETS_SET_PARAM is set to 1 the parameters for the part are generated
|
|
# from the description transforming unstructured descriptions into structured parameters;
|
|
# each parameter in description should have the form: "...;name1:value1;name2:value2"
|
|
PROVIDER_OEMSECRETS_SET_PARAM=1
|
|
#
|
|
# This environment variable determines the sorting criteria for product results.
|
|
# The sorting process first arranges items based on the provided keyword.
|
|
# Then, if set to 'C', it further sorts by completeness (prioritizing items with the most
|
|
# detailed information). If set to 'M', it further sorts by manufacturer name.
|
|
#If unset or set to any other value, no sorting is performed.
|
|
PROVIDER_OEMSECRETS_SORT_CRITERIA=C
|
|
|
|
|
|
# Reichelt provider:
|
|
# Reichelt.com offers no official API, so this info provider webscrapes the website to extract info
|
|
# It could break at any time, use it at your own risk
|
|
# We dont require an API key for Reichelt, just set this to 1 to enable Reichelt support
|
|
PROVIDER_REICHELT_ENABLED=0
|
|
# The country to get prices for
|
|
PROVIDER_REICHELT_COUNTRY=DE
|
|
# The language to get results in (en, de, fr, nl, pl, it, es)
|
|
PROVIDER_REICHELT_LANGUAGE=en
|
|
# Include VAT in prices (set to 1 to include VAT, 0 to exclude VAT)
|
|
PROVIDER_REICHELT_INCLUDE_VAT=1
|
|
# The currency to get prices in (only for countries with countries other than EUR)
|
|
PROVIDER_REICHELT_CURRENCY=EUR
|
|
|
|
# Pollin provider:
|
|
# Pollin.de offers no official API, so this info provider webscrapes the website to extract info
|
|
# It could break at any time, use it at your own risk
|
|
# We dont require an API key for Pollin, just set this to 1 to enable Pollin support
|
|
PROVIDER_POLLIN_ENABLED=0
|
|
|
|
##################################################################################
|
|
# EDA integration related settings
|
|
##################################################################################
|
|
|
|
# This value determines the depth of the category tree, that is visible inside KiCad
|
|
# 0 means that only the top level categories are visible. Set to a value > 0 to show more levels.
|
|
# Set to -1, to show all parts of Part-DB inside a single category in KiCad
|
|
EDA_KICAD_CATEGORY_DEPTH=0
|
|
|
|
###################################################################################
|
|
# SAML Single sign on-settings
|
|
###################################################################################
|
|
# Set this to 1 to enable SAML single sign on
|
|
# Be also sure to set the correct values for DEFAULT_URI
|
|
SAML_ENABLED=0
|
|
|
|
# Set to 1, if your Part-DB installation is behind a reverse proxy and you want to use SAML
|
|
SAML_BEHIND_PROXY=0
|
|
|
|
# A JSON encoded array of role mappings in the form { "saml_role": PARTDB_GROUP_ID, "*": PARTDB_GROUP_ID }
|
|
# The first match is used, so the order is important! Put the group mapping with the most privileges first.
|
|
# Please not to only use single quotes to enclose the JSON string
|
|
SAML_ROLE_MAPPING='{}'
|
|
# A mapping could look like the following
|
|
#SAML_ROLE_MAPPING='{ "*": 2, "admin": 1, "editor": 3}'
|
|
|
|
# When this is set to 1, the group of SAML users will be updated everytime they login based on their SAML roles
|
|
SAML_UPDATE_GROUP_ON_LOGIN=1
|
|
|
|
# The entity ID of your SAML IDP (e.g. the realm name of your Keycloak server)
|
|
SAML_IDP_ENTITY_ID="https://idp.changeme.invalid/realms/master"
|
|
# The URL of your SAML IDP SingleSignOnService (e.g. the endpoint of your Keycloak server)
|
|
SAML_IDP_SINGLE_SIGN_ON_SERVICE="https://idp.changeme.invalid/realms/master/protocol/saml"
|
|
# The URL of your SAML IDP SingleLogoutService (e.g. the endpoint of your Keycloak server)
|
|
SAML_IDP_SINGLE_LOGOUT_SERVICE="https://idp.changeme.invalid/realms/master/protocol/saml"
|
|
# The public certificate of the SAML IDP (e.g. the certificate of your Keycloak server)
|
|
SAML_IDP_X509_CERT="MIIC..."
|
|
|
|
# The entity of your SAML SP, must match the SP entityID configured in your SAML IDP (e.g. Keycloak).
|
|
# This should be a the domain name of your Part-DB installation, followed by "/sp"
|
|
SAML_SP_ENTITY_ID="https://partdb.changeme.invalid/sp"
|
|
|
|
# The public certificate of the SAML SP
|
|
SAML_SP_X509_CERT="MIIC..."
|
|
# The private key of the SAML SP
|
|
SAML_SP_PRIVATE_KEY="MIIE..."
|
|
|
|
|
|
######################################################################################
|
|
# Other settings
|
|
######################################################################################
|
|
# In demo mode things it is not possible for a user to change his password and his settings.
|
|
DEMO_MODE=0
|
|
|
|
# Change this to true, if no url rewriting (like mod_rewrite for Apache) is available
|
|
# In that case all URL contains the index.php front controller in URL
|
|
NO_URL_REWRITE_AVAILABLE=0
|
|
|
|
# Set to 1, if Part-DB should redirect all HTTP requests to HTTPS. You dont need to configure this, if your webserver already does this.
|
|
REDIRECT_TO_HTTPS=0
|
|
|
|
# If you want to use fixer.io for currency conversion, you have to set this to your API key
|
|
FIXER_API_KEY=CHANGEME
|
|
|
|
# Override value if you want to show to show a given text on homepage.
|
|
# When this is empty the content of config/banner.md is used as banner
|
|
BANNER=""
|
|
|
|
APP_ENV=prod
|
|
APP_SECRET=a03498528f5a5fc089273ec9ae5b2849
|
|
|
|
# Set this to zero, if you want to disable the year 2038 bug check on 32-bit systems (it will cause errors with current 32-bit PHP versions)
|
|
DISABLE_YEAR2038_BUG_CHECK=0
|
|
|
|
# Set the trusted IPs here, when using an reverse proxy
|
|
#TRUSTED_PROXIES=127.0.0.0/8,::1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
|
|
#TRUSTED_HOSTS='^(localhost|example\.com)$'
|
|
|
|
|
|
###> symfony/lock ###
|
|
# Choose one of the stores below
|
|
# postgresql+advisory://db_user:db_password@localhost/db_name
|
|
LOCK_DSN=flock
|
|
###< symfony/lock ###
|
|
|
|
###> nelmio/cors-bundle ###
|
|
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
|
|
###< nelmio/cors-bundle ###
|