Commit Graph

104 Commits

Author SHA1 Message Date
jo 7ff59e272c chore(api): disable some linting rule 2022-06-22 13:37:17 +02:00
Jonas L cbfd9e51fd
fix(api): update model fields in set_icecast_passwords (#1903) 2022-06-22 08:35:26 +02:00
Jonas L dc426f0aa5
feat(api): rename user model fields (#1902) 2022-06-21 23:43:03 +02:00
jo 28c4989d44 chore(api): update StreamSetting model 2022-06-21 16:53:25 +02:00
jo 6bae0e2846 chore(api): update Preference model 2022-06-21 16:53:25 +02:00
Jonas L b9895d19e2
chore(api): move podcasts in dedicated app (#1899) 2022-06-21 14:40:21 +02:00
jo b10696265f ci: check and dispatch api schema changes
- check if api schema is outdated
- do not cancel in progress workflow
  Since this workflow commit to an external repo, it might squash multiple changes into a single commit.
- dispatch each schema update to client repo
- cache pip dependencies
2022-06-18 12:13:11 +02:00
jo 08bcaf459c chore(api): add openapi schema 2022-06-18 12:13:11 +02:00
jo 71cfab79ef feat: rename default stream mount point to main
This will not change the default mount point if you are upgrading.

BREAKING: The default stream mount point changed from `airtime_128` to `main`. Be sure to updates your clients accordingly.
2022-06-18 12:08:29 +02:00
jo 7457a29e7f chore(api): pin django related packages 2022-06-18 11:55:02 +02:00
jo 9babb0c4f0 chore(api): pin/downgrade django-filter to ~=21.1.0 2022-06-18 11:55:02 +02:00
jo 14b716d366 chore(api): pin/upgrade django to ~=3.2.13 2022-06-18 11:55:02 +02:00
jo eef789e4d1 chore(api): rename deprecated filter_fields to filterset_fields 2022-06-18 11:55:02 +02:00
Jonas L 7f926ab6a5
fix(api): allow updating default_icecast_password (#1872)
Correctly implement the Preference.objects.update_or_create function.
2022-06-12 07:52:54 +02:00
Jonas L 9d0c098684
test(api): use pytest to run api tests (#1645) 2022-06-09 16:26:47 +02:00
jo 3bca92413f fix: drop unused sequences
Drop old campcaster sequences that aren't used anymore.
2022-06-08 23:23:08 +02:00
jo df5ac70769 fix(api): missing build-essential to build psycopg2 2022-06-08 23:23:08 +02:00
jo 28b9343c77 fix(legacy): remove not null contraint when using default
This fixes the inital schema creation to match as if the old migrations
were always run.

The third_party_track_references.file_id field should not have a not
null constraint while have a default value to 0.
2022-06-08 23:23:08 +02:00
jo f7bb6e7592 feat: move storage path setting to configuration file
- change default storage path to /srv/libretime
- remove music dirs table
- use /tmp for testing storage
- storage dir should always have a trailing slash
2022-06-08 23:23:08 +02:00
jo 510e978952 feat: add systemd libretime.target
- add wanted by
- instantly start services in vagrant
2022-06-08 23:23:08 +02:00
jo 91f8a51a1e feat(api): create set_icecast_passwords command
- allow to fetch icecast password from xml config
- set default stream password
2022-06-08 23:23:08 +02:00
jo 980f1acd0c fix: correct cc_file.artwork column size 2022-06-08 23:23:08 +02:00
jo 6889e11a91 fix: don't add track types only on migration 2022-06-08 23:23:08 +02:00
jo 4be8bde14e feat: drop cc_locale table 2022-06-08 23:23:08 +02:00
jo 0e4bc4cacd feat: replace php migration with django migration
- keep latest legacy version in initial migration file
- move propel schema to api legacy app
- remove legacy upgrade tool
2022-06-08 23:23:08 +02:00
jo ee98387264 feat(installer): rewrite install script
- remove unused root packages.ini
- write config to yaml file
- allow to set public_url during install
- force icecast start right after package install
- move config file in place at the end of installation

BREAKING CHANGE: The bash installer has been rewritten, the flags and
options changed, please run `./install --help` to get more details.
2022-06-08 23:23:08 +02:00
jo aed6d2f294 feat: change config dir path to /etc/libretime
BREAKING: The configuration directory changed from `/etc/airtime` to
`/etc/libretime`. Please rename your configuration directory accordingly.
2022-06-08 23:23:08 +02:00
jo 604ff20239 feat: change config filename to config.yml
BREAKING: The configuration file name changed from `airtime.conf` to
`config.yml`. Please rename your configuration file accordingly.
2022-06-08 23:23:08 +02:00
jo 3d7083f602 chore(api): format schema using prettier 2022-04-26 08:10:39 +02:00
jo 751d430bcc feat: replace exploded base_* with public_url
Fixes #1574

BREAKING CHANGE: The `general` section in the config schema has changed: the `general.base_*`, `general.protocol` and `general.force_ssl` configuration fields have been replaced with a single `general.public_url` field. Be sure to use a valid url with the new configuration field.
2022-04-25 16:45:01 +02:00
Jonas L 41df76eed0
feat(api): replace uwsgi with gunicorn (#1785)
Related to #1719

BREAKING: The uwsgi packages and configuration files (`/etc/airtime/libretime-api.ini`) should be removed from the system.
2022-04-25 16:09:19 +02:00
Jonas L dc92661c49
chore(api): move uswgi config in api/install (#1781) 2022-04-21 07:14:35 +02:00
Jonas L 28fc8360a3
fix(api): prevent timing attacke on api key (#1771) 2022-04-17 18:55:18 +02:00
Jonas L 9d5de61241
chore(api): add mypy django stubs plugins (#1726) 2022-04-09 12:18:23 +02:00
Kyle Robbertze beebe79edd
ci: generate schema and push to api-client repo (#1740)
* chore(api): add schema generation make target

* ci: generate schema and push to api-client repo
2022-04-08 15:38:58 +02:00
jo 0bbd46c33f refactor(api): fix pylint errors 2022-04-04 15:20:22 +02:00
jo bf8db3e6f0 chore(api): add pylint-django plugin 2022-04-04 15:20:22 +02:00
Jonas L fce988aef1
feat(api): split api into multiple apps (#1626)
Fixes #1622

- split the api into 4 apps: core, history, schedule, storage
- exploded the settings into testing/prod
2022-04-04 14:38:50 +02:00
Jonas L 8c96c0a094
feat: remove unused python3-venv package (#1728) 2022-04-02 05:41:43 +02:00
Kyle Robbertze cbcd0abcae
chore(api): add API metadata (#1723) 2022-04-01 15:17:40 +02:00
Jonas L 7e9c9a2792
chore: rename vagrant devices (#1716) 2022-03-29 14:25:34 +02:00
jo e5d6216e1d feat(api): include id in file/webstream serializers 2022-03-06 15:17:44 +02:00
Jonas L f5bb31e971
fix(api): static_url settings is required in dev mode (#1662) 2022-03-04 15:50:05 +02:00
jo 2dcc654b70 feat(api): load config using shared helpers
- add django settings module documentation
- use default for previously required fields

BREAKING CHANGE: The API command line interface require the
configuration file to be present. The default configuration file path is
`/etc/airtime/airtime.conf`
2022-03-02 22:03:56 +02:00
jo 9af717ef7f feat(api): remove admin app and static files
- remove django admin app,
- disable static files for production deployment,
- keep the rest framework browsable api in dev mode.
2022-03-02 22:03:56 +02:00
jo 4da8d8c06b fix(api): model_bakery is a dev dependency 2022-03-02 22:03:56 +02:00
Jonas L d55e58e416
chore: auto generate requirements.txt (#1651)
- force LC_ALL for the sort command
2022-02-28 20:02:01 +02:00
Jonas L 98cea4dcd2
feat(api): improve uwsgi systemd integration (#1614) 2022-02-19 09:03:25 +02:00
jo 924b7f8f46 test(api): add bandit linter check 2022-02-14 21:01:35 +02:00
Jonas L 3245216869
feat(legacy): add db config defaults and allow custom port (#1559)
* feat(legacy): allow custom port for database connection

- fix heredoc for php72

* update test config db section

* update sample config db section

* update api db config

* use defaults for database config section

* update documentation

* more documentation for migration
2022-02-04 16:03:01 +02:00