Skip to content

.config.json

Mario Borna Mjertan edited this page Aug 3, 2020 · 1 revision

The .config.json file stores basic configuration.

You can find a sample of it in docs/samples/config.json. You should copy that file into the vmss root as .config.json.

For guidance, here's how a config file might look like:

{
	"database":{
		"type": "mysql",
		"host": "localhost",
		"user": "superdev",
		"password": "123456",
		"database": "vmss",
		"charset": "utf8"
	},
	"env": "dev",
	"hash": "3",
	"privateKeyAlgorithm": "argon2id",
	"randomStringLength": 16,
	"uploadFolder": "uploads/",
	"autoExpireNoncesAfter": -1,
	"urlbase": "http://vmss.local",
	"queueKey": "6U3cy8dHLzLiEM",
	"allowedTypes": ["webm", "mkv", "avi", "wmv", "mov", "mp4", "m4v", "mpg", "mp2", "mpeg", "mpv", "m2v", "m4v"],
	"showWelcome": true,
	"convertActions": ["convert/mp4/1080p", "convert/mp4/720p", "convert/mp4/480p", "convert/mp4/360p", "convert/webm/1080p", "convert/webm/720p", "convert/webm/480p", "convert/webm/360p"]
}

Parsing

vmss parses .config.json with json_decode.

Configuration options

database

The database object stores info about what MySQL database vmss should connect to.

database.type

Availability: 0.1+

Type: string

Recommended values: mysql

Description: PDO driver name

database.host

Availability: 0.1+

Type: string

Recommended values: (any)

Description: Database host (for MySQL databases), used to construct the DSN string

database.user

Availability: 0.1+

Type: string

Recommended values: (any)

Description: Database user (for MySQL databases)

database.password

Availability: 0.1+

Type: string

Recommended values: (any)

Description: Database user password (for MySQL databases)

database.database

Availability: 0.1+

Type: string

Recommended values: (any)

Description: Database name (for MySQL databases)

database.charset

Availability: 0.1+

Type: string

Recommended values: utf8

Description: Database charset (for MySQL databases)

env

Availability: 0.1+

Type: string

Recommended values: dev, production

Description: The environment vmss is running in. If set to dev, vmss will respond with significantly more data about errors.

hash

Availability: 0.1-0.3

Type: int

Recommended values: 3

Description: The algorithm to use with password_hash. Deprecated in favour of privateKeyAlgorithm to be more descriptive.

privateKeyAlgorithm

Availability: 0.1-0.3

Type: string (int on older PHP versions)

Recommended values: argon2id, 3

Description: The algorithm to use with password_hash when saving the private key.

Want to help out in VMSS development? We'd be glad to have you on board.

If you need onboarding or have any questions, feel free to email us (me) at [email protected]

Clone this wiki locally