Skip to content

Commit

Permalink
Switch default settings file to toml
Browse files Browse the repository at this point in the history
  • Loading branch information
TheReverend403 committed Mar 11, 2024
1 parent 0e8079a commit 6c6ef3e
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ git clone https://github.com/TheReverend403/pste
cd pste
poetry install
yarn install # or `npm install` if you're a caveman.
cp pste/resources/config/settings.yml config/settings.yml # Edit settings.yml
cp pste/resources/config/settings.toml config/settings.toml # Edit settings.toml
poetry shell

echo FLASK_APP=pste\nFLASK_ENV=development > .flaskenv
Expand Down
4 changes: 2 additions & 2 deletions docker/rootfs/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
set -eu

if [ -z "$(find "${ROOT_PATH_FOR_DYNACONF}" -type f -mindepth 1 -maxdepth 1)" ]; then
echo "Copying default settings.yml to ${ROOT_PATH_FOR_DYNACONF}"
cp -au "${FLASK_APP}/resources/config/settings.yml" "${ROOT_PATH_FOR_DYNACONF}"
echo "Copying default settings.toml to ${ROOT_PATH_FOR_DYNACONF}"
cp -au "${FLASK_APP}/resources/config/settings.toml" "${ROOT_PATH_FOR_DYNACONF}"
fi

if [ "${SKIP_MIGRATIONS:-false}" = "false" ]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,65 @@
# Site name
name: 'pste'
name = "pste"

# MUST be set to a secure, random value.
# Generate one with:
# python -c "import uuid; print(uuid.uuid4().hex);"
secret_key: ''
secret_key = ""

# Database
# https://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls
sqlalchemy_database_uri: ''
sqlalchemy_database_uri = ""

# Redis
# https://redis.readthedocs.io/en/stable/connections.html#redis.Redis.from_url
redis_url: ''
redis_url = ""

# Overrides redis_url specifically for sessions.
# sessions_redis_url: ''
# sessions_redis_url = ""

# File extensions that will be displayed as plaintext regardless of the file's mimetype.
plaintext_types: [
'txt', 'php', 'rb', 'sh', 'py',
'conf', 'c', 'cpp', 'java', 'rs',
'html', 'htm', 'js', 'xml', 'sql',
'lua', 'cs', 'pl', 'md', 'ini',
'shtml', 'yaml', 'cfg', 'go', 'fish',
'yml', 'bash'
plaintext_types = [
"txt",
"php",
"rb",
"sh",
"py",
"conf",
"c",
"cpp",
"java",
"rs",
"html",
"htm",
"js",
"xml",
"sql",
"lua",
"cs",
"pl",
"md",
"ini",
"shtml",
"yaml",
"cfg",
"go",
"fish",
"yml",
"bash"
]

# If disabled, users can only be created via 'flask user create'.
enable_registration: false
enable_registration = false

# Storage quota per-user in bytes. Default is 1GB
user_storage_limit: 1073741824
user_storage_limit = 1_073_741_824

# Max size of a single file upload. Defaults to 1GB.
max_upload_size: 1073741824
# Max size of a single file upload. Default is 1GB.
max_upload_size = 1_073_741_824

# Minimum length of generated file URLs, excluding the file extension part (if any).
min_url_length: 3
min_url_length = 5

# Sentry
# https://sentry.io
sentry_dsn: ''
sentry_dsn = ""

0 comments on commit 6c6ef3e

Please sign in to comment.