Add a default configuration file #73

Closed
Ember wants to merge 5 commits from Ember:default-config into master
Contributor

This pull request adds a default configuration file at instance/config.py. This configuration file is pre-populated with all the default values, along with a short block of documentation explaining what each option does.

The goal is to help ease the process of starting up a new instance. By making setup easier to understand and reducing overall friction, more admins will be able to spin up instances quicker and easier.

Let me know what you think of the documentation, and if I've made any mistakes in my descriptions.

As a note, I've omitted SQLALCHEMY_TRACK_MODIFICATIONS and PREFERRED_URL_SCHEME, as SQLALCHEMY_TRACK_MODIFICATIONS seems to be 0x0 configuring sqlalchemy moreso than something that can be configured about 0x0? And PREFERRED_URL_SCHEME seemed to permit http requests just fine even when set to https, so I couldn't really figure out a reason for it to be anything but https. However, I might be wrong about these things, and if so, I'll add them back.

This pull request adds a default configuration file at `instance/config.py`. This configuration file is pre-populated with all the default values, along with a short block of documentation explaining what each option does. The goal is to help ease the process of starting up a new instance. By making setup easier to understand and reducing overall friction, more admins will be able to spin up instances quicker and easier. Let me know what you think of the documentation, and if I've made any mistakes in my descriptions. As a note, I've omitted `SQLALCHEMY_TRACK_MODIFICATIONS` and `PREFERRED_URL_SCHEME`, as `SQLALCHEMY_TRACK_MODIFICATIONS` seems to be 0x0 configuring sqlalchemy moreso than something that can be configured about 0x0? And `PREFERRED_URL_SCHEME` seemed to permit `http` requests just fine even when set to `https`, so I couldn't really figure out a reason for it to be anything but `https`. However, I might be wrong about these things, and if so, I'll add them back.
Ember added 2 commits 2022-11-27 05:08:49 +01:00
Ember force-pushed default-config from 103993c7a0 to da2357183c 2022-11-27 05:10:14 +01:00 Compare
Owner

I suggest calling the file config.py.example so that pulling from the git repository will not conflict with existing/modified files.

I suggest calling the file `config.py.example` so that pulling from the git repository will not conflict with existing/modified files.
Ember added 1 commit 2022-11-28 17:58:59 +01:00
Author
Contributor

Done! And the README updated to match

Done! And the README updated to match
mia requested changes 2022-11-28 19:27:23 +01:00
mia left a comment
Owner

Just minor corrections, then it’ll be good to merge. Thanks!

Just minor corrections, then it’ll be good to merge. Thanks!
@ -0,0 +25,4 @@
# sqlite:/// + /path/to/your/database.db
#
# Until https://git.0x0.st/mia/0x0/issues/70 is resolved, it's recommended that
# any sqlite databases use an absolute paths, as relative paths aren't
Owner

absolute paths → absolute path

absolute paths → absolute path
Ember marked this conversation as resolved
@ -0,0 +89,4 @@
# file to have the file extension that matches.
#
# For example, if the user uploads "myfile.png", but the file is actually a
# jpg, the file will get a URL like "eAa.jpg"
Owner

This is not true: This dict specifies overrides for python-magic’s default file extensions for each MIME type. Sometimes that’s something silly. It is only used when a file is uploaded without a file name extension.

This is not true: This dict specifies overrides for python-magic’s default file extensions for each MIME type. Sometimes that’s something silly. It is only used when a file is uploaded without a file name extension.
Author
Contributor

Oh oops! I badly misread the code there 😅

Oh oops! I badly misread the code there 😅
Ember marked this conversation as resolved
Ember added 1 commit 2022-11-28 21:39:35 +01:00
Author
Contributor

How's this look?

How's this look?
Ember requested review from mia 2022-11-28 21:40:32 +01:00
Author
Contributor

oop dont merge found a bug okay all good

~~oop dont merge found a bug~~ okay all good
Ember added 1 commit 2022-11-28 22:15:29 +01:00
mia approved these changes 2022-11-28 22:15:36 +01:00
mia referenced this issue from a commit 2022-11-28 22:30:15 +01:00
mia referenced this issue from a commit 2022-11-28 22:30:58 +01:00
Owner

Merged as be796b9b5b. Thanks!

Merged as be796b9b5b. Thanks!
mia closed this pull request 2022-11-28 22:32:20 +01:00
Ember deleted branch default-config 2022-11-28 22:35:14 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
mia
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mia/0x0#73
No description provided.