# NOTE: keep in sync with app/config.class.php
CONFIG_VERSION: 2025013101

# Environment (development|test|production).
APP_ENV: 'production'

# Used for assets versioning (js, css etc.) to control clients (browser) cache
# invalidation. If not defined, ASSETS_VERSION default to the current day (i.e.
# clients cache will be forcefully invalidated each day at midnight). To
# disable asset versioning simply set ASSETS_VERSION to the empty string.
ASSETS_URL:

default: &default
    # Security first :)
    security:
        # The bcrypt cost, used for authentication.
        #
        #   This value should be ajusted so that password check takes between 0.2s
        #   and 0.5s (depending on the resistance against online/offline attack
        #   desired).
        bcrypt_cost: 14
        # true if you want csrf check by default, false otherwise.
        csrf: true
        # CORS setup
        # see https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
        cors:
            enabled: true
            allow-credentials: true
            allowed-origins:
                - https://kiosk.annecy-mosquee.com


    # routing and URLs options
    routing:
        # Rewrite URLs, set to true to activate.
        #
        #   This will turn URLs like /?controller=foo&action=bar&id=42 to /foo/bar/42 
        #
        #   NOTE:
        #     If you activate this option, make sure that the server is configured 
        #     accordingly (for example through .htaccess under Apache).
        rewrite: true


    # localization, timezone and internationalization configuration options.
    l10n:
        # Timezone setup. used as argument for date_default_timezone_set()
        #
        #   see http://php.net/manual/en/function.date-default-timezone-set.php
        #   To find a Timezone see http://www.php.net/manual/en/timezones.php
        default_timezone: Europe/Zurich

        # Locale setup. used as argument for setlocale()
        #
        #  see http://php.net/manual/fr/function.setlocale.php
        #  To find a locale run `locale -a'.
        #
        #  NOTE:
        #    An UTF-8 locale is strongly recommended since no2 rely on using UTF-8.
        default_locale: fr_CH.utf8
        # the date, in the strftime format, see
        # https://secure.php.net/manual/en/function.strptime.php
        # XXX: this will likely work with "%e %B %Y" and likely bug with everything
        #      else.
        #      This format is translated by strftime2momentjs() to a matching
        #      moment.js format to ensure compatibility with the js datetimepicker.
        #      If you need to change it, triple check that the translated moment.js
        #      format is the same.
        strftime_date_format: "%e %B %Y"
        # the datetime, the strftime format, see
        # https://secure.php.net/manual/en/function.strptime.php
        # XXX: this will likely work with "%e %B %Y %H:%M" and likely bug with
        #      everything else.
        #      This format is translated by strftime2momentjs() to a matching
        #      moment.js format to ensure compatibility with the js datetimepicker.
        #      If you need to change it, triple check that the translated moment.js
        #      format is the same.
        strftime_datetime_format: "%e %B %Y %H:%M"

        # available languages
        languages:
            fr: français
            en: english

        # language / locale match
        lang2locale:
            fr: fr_CH.utf8
            en: en_GB.utf8

        # translation files
        translations:
            fr_CH.utf8: "{{APPDIR}}/locales/messages.fr.yml"
            en_GB.utf8: "{{APPDIR}}/locales/messages.en.yml"

    # database setup.
    database: mysql://annecymostripe:GMbJkL1207@annecymostripe.mysql.db/annecymostripe

    # Logger setup.
    logger: &logger

        # printed on every lines, mostly if many loggers uses the same file or
        # facility.
        name: stripe
        # maximum verbosity level.
        #
        #  possible values are:
        #    EMERGENCY - system is unusable
        #    ALERT     - action must be taken immediately
        #    CRITICAL  - critical conditions
        #    ERROR     - error conditions
        #    WARNING   - warning conditions
        #    NOTICE    - normal but significant condition
        #    INFO      - informational messages
        #    DEBUG     - debug messages
        #    No2/DEBUG - used internally by the no2 framework, very verbose.
        #
        #  see No2_Logger constants.
        level: DEBUG

        # optional, the log file to write to.
        logfile_path: '{{PROJECTDIR}}/log/application.log'

        # optional, the syslog facility.
        #facility: LOG_LOCAL0

    # is this app an api server
    # if defined to true, no sessions will be maintained
    api_mode: true

    stripe:
        # publishable key to be used on mobile
        publishable_key: pk_live_51QyUt3Gld4qkfszW1tkum0L82h0d1QxlPh5LfB2jE9CpvzQuQeuXqKcjlopdFv8yvMzpsqjYML5Rl0V2GrD7Nuii00dHhCFDYs  # Prod

        # webhook secrets
        webhook_secrets:
            we_1R0CmbGld4qkfszWgGh8Rcwm: 'whsec_ilWFOkqrVkUi3MVqEmRyWwAnXN38hb4y'     # Prod
        api_key: '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'  # Prod
        account_id: ~

development:
    <<: *default

    stripe:
        # publishable key to be used on mobile
        publishable_key: 'pk_test_51QyUtKGdqk7uXKqkIglMmeO2RNOwCaI1c90WUsOKpQCk4P1Sz180QvakW3RzwYg5513lvnQ7uVkzsNQhLphrvULX00oHuQDMRX'  # Dev

        # webhook secrets
        webhook_secrets:
            we_1QzIHpGdqk7uXKqkt0WUr7z4: 'whsec_3bsXe1YWzCMu79U3kCvT28KJTovO1pZA'     # Dev
        api_key: 'sk_test_51QyUtKGdqk7uXKqkuV1VIL778tihRZycoTEFkYB9rZKp5aar7OY9Lx0MASH7Sdg2BtfUbjri8U5DQENvtvqcaxd800jkvZr2yo'  # Dev
        account_id: ~
        terminals:
            kiosk1: 'tmr_F8QZXwEdwefqWQ'

test:
    <<: *default

    # database setup.
    database: pgsql://postgres:root@localhost/balidra_pixoo_test

    # Logger setup.
    logger:
        name: tests
        level: No2/DEBUG
        logfile_path: '{{PROJECTDIR}}/tests/tests.log'

    # Port to use when launching standalone PHP server
    php_server_port: 4444

production:
    <<: *default

