a mini social media app for small communities
at main 2.5 kB view raw
1plugins = [ 'v' ] 2 3task::fetch-build-info = { 4 description = 'Fetch misc build information, mainly for the about page' 5 run = 'v scripts/fetchbuildinfo.vsh' 6} 7 8// Database 9 10task:db.init = { 11 description = 'Initialize and start a local Postgres database via Docker' 12 category = 'db' 13 run = 'docker run -it \ 14 --name beep-database \ 15 -e POSTGRES_DB=beep \ 16 -e POSTGRES_USER=beep \ 17 -e POSTGRES_PASSWORD=beep \ 18 --mount source=beep-data,target=/var/lib/postgresql/data \ 19 -p 127.0.0.1:5432:5432 \ 20 postgres:17' 21} 22 23task:db.start = { 24 description = 'Start the docker image for the local database' 25 category = 'db' 26 run = 'docker start beep-database' 27} 28 29task:db.stop = { 30 description = 'Stop the docker image for the local database' 31 category = 'db' 32 run = 'docker stop beep-database' 33} 34 35task:db.login = { 36 description = 'Log into and modify the local database' 37 category = 'db' 38 run = 'docker exec -it beep-database psql -h localhost -p 5432 -d beep -U beep -W' 39} 40 41task:db.shell = { 42 description = 'Open a shell in the local database' 43 category = 'db' 44 run = 'docker exec -it beep-database sh' 45} 46 47task:db.dangerous.nuke = { 48 description = 'Delete the docker image AND ITS DATA. This will delete **EVERYTHING** in the database.' 49 category = 'db' 50 run = 'docker rm beep-database && docker volume rm beep-data' 51} 52 53// Ngrok 54 55task:ngrok = { 56 description = 'Open an ngrok tunnel for testing.' 57 category = 'misc' 58 run = 'ngrok http http://localhost:8008' 59} 60 61task:ngrok.url = { 62 description = 'Open an ngrok tunnel for testing. Requires you to pass the ngrok URL as an argument.' 63 category = 'misc' 64 run = 'ngrok http --url=${args} http://localhost:8008' 65} 66 67// Run 68 69task:run = { 70 description = 'Run beep' 71 category = 'run' 72 depends = [':fetch-build-info'] 73 run = '${v} run ${v_main} config.maple' 74} 75 76task:run.real = { 77 description = 'Run beep using config.real.maple' 78 category = 'run' 79 depends = [':fetch-build-info'] 80 run = '${v} run ${v_main}' 81} 82 83task:run.watch = { 84 description = 'Watch/run beep' 85 category = 'run' 86 depends = [':fetch-build-info'] 87 run = '${v} -d veb_livereload watch run ${v_main} config.maple' 88} 89 90task:run.watch.real = { 91 description = 'Watch/run beep using config.real.maple' 92 category = 'run' 93 depends = [':fetch-build-info'] 94 run = '${v} watch run ${v_main}' 95} 96 97// Misc 98 99task:cloc = { 100 description = 'Get the lines of code for beep!' 101 category = 'misc' 102 //todo: contribute vlang support to cloc and use that here instead of it seeing all of our v code as verilog code 103 run = 'cloc ./src/' 104}