Files
music_library/mise.toml
T
2025-03-23 13:49:43 +00:00

126 lines
2.7 KiB
TOML

[env]
LAST_FM_USER = 'change-me'
LAST_FM_API_KEY = 'change-me'
OPENAI_KEY = 'change-me'
[tools]
hurl = 'latest'
flyctl = 'latest'
sqlite = 'latest'
gh = 'latest'
# BUILDING BLOCKS
# NPM DEPS
[tasks.npm-install]
run = 'npm install'
hide = true
dir = 'assets'
[tasks.npm-update]
run = 'npm update'
hide = true
dir = 'assets'
[tasks.npm-outdated]
run = 'npm outdated'
hide = true
dir = 'assets'
# TAILWIND DEP
[tasks.tailwind-update]
description = 'Update the Tailwind version configured in the project'
run = 'mix tailwind.update_version'
hide = true
[tasks.tailwind-outdated]
description = 'Checks that the Tailwind version is up to date'
run = 'mix tailwind.check_version'
hide = true
# MIX DEPS
[tasks.mix-update]
description = 'Update mix dependencies'
run = ['mix deps.update --all']
hide = true
[tasks.mix-outdated]
description = 'Show outdated mix dependencies'
run = ['mix hex.outdated --all']
hide = true
# PUBLIC TASKS
# DEPENDENCIES
[tasks.deps-outdated]
depends = ['npm-outdated', 'tailwind-outdated', 'mix-outdated']
description = 'Show outdated dependencies'
[tasks.deps-update]
depends = ['npm-update', 'tailwind-update', 'mix-update']
description = 'Update dependencies'
# SETUP
[tasks.setup]
depends = ['npm-install']
description = 'Install dependencies and setup the database'
run = ['mix setup']
# PRODUCTION
[tasks.prod-console]
description = 'Open an ssh console to the production env'
run = 'fly ssh console'
[tasks.prod-backup]
description = 'Backup the production database to the local development env'
run = 'mix music_library.prod.db_backup'
[tasks.prod-prune-backups]
description = 'Deletes all downloaded database backups'
run = 'rm data/music_library_prod*'
[tasks.prod-test]
description = 'Run HTTP tests against production'
run = 'hurl --test test/prod.hurl'
# GIT TOOLING
[tasks.static-checks-hook]
description = '''
Pre-commit task to ensure code conforms to static checks policies.
Install with `mise generate git-pre-commit --write --task=static-checks-hook`
'''
run = 'mix do format --check-formatted, credo --strict, gettext.extract --check-up-to-date'
hide = true
# DEVELOPMENT/TEST
[tasks.static-checks]
description = 'Run static checks for code formatting, translations, quality'
run = 'mix do format, credo, gettext.extract'
[tasks.test]
description = 'Run project tests'
run = 'mix test'
[tasks.console]
description = 'Run the application attached to an IEx console'
run = 'iex -S mix phx.server'
# DOCKER
[tasks.docker-build]
description = 'Builds and tags the application Docker image'
run = 'docker build -t fullyforged/music_library .'
[tasks.docker-push]
description = 'Push the image to the registry'
run = 'docker push fullyforged/music_library'