a mini social media app for small communities
1plugins = [ 'v' ] 2 3task:db.init = { 4 description = 'Initialize and start a local Postgres database via Docker' 5 category = 'db' 6 run = 'docker run -it \ 7 --name beep-database \ 8 -e POSTGRES_DB=beep \ 9 -e POSTGRES_USER=beep \ 10 -e POSTGRES_PASSWORD=beep \ 11 --mount source=beep-data,target=/var/lib/postgresql/data \ 12 -p 5432:5432 \ 13 postgres:15' 14} 15 16task:db.start = { 17 description = 'Start the docker image for the local database' 18 category = 'db' 19 run = 'docker start beep-database' 20} 21 22task:db.stop = { 23 description = 'Stop the docker image for the local database' 24 category = 'db' 25 run = 'docker stop beep-database' 26} 27 28task:db.login = { 29 description = 'Log into and modify the local database' 30 category = 'db' 31 run = 'docker exec -it beep-database psql -h localhost -p 5432 -d beep -U beep -W' 32} 33 34task:db.shell = { 35 description = 'Open a shell in the local database' 36 category = 'db' 37 run = 'docker exec -it beep-database sh' 38} 39 40task:db.dangerous.nuke = { 41 description = 'Delete the docker image AND ITS DATA. This will delete **EVERYTHING** in the database.' 42 category = 'db' 43 run = 'docker rm beep-database && docker volume rm beep-data' 44} 45 46task:run = { 47 description = 'Run beep' 48 category = 'run' 49 run = '${v} -d veb_livereload watch run ${v_main} config.maple' 50} 51 52task:run.real = { 53 description = 'Run beep using config.real.maple' 54 category = 'run' 55 run = '${v} -d veb_livereload watch run ${v_main} config.real.maple' 56}