Look at the nuxt 3 documentation to learn more.
create a directory in which to host your postgres docker volume. mine here is $HOME/pg/data-14. then create a .sh file with similar contents:
#!/usr/bin/env bash
docker run --rm --name pg14 --shm-size=1g -e POSTGRES_PASSWORD=1234 -d -p 5432:5432 -v $HOME/pg/data-14:/var/lib/postgresql/data postgres
to make a new db:
psql -h 0.0.0.0 -U postgres -c 'create database fnb;'
psql -h 0.0.0.0 -U postgres -d fnb -f ./db/roles.sql
psql -h 0.0.0.0 -U postgres -d fnb -f ./db/fnb.sql
to replace the whole db
psql -h 0.0.0.0 -U postgres -c 'drop database fnb;'
psql -h 0.0.0.0 -U postgres -c 'create database fnb;'
psql -h 0.0.0.0 -U postgres -d fnb -f ./db/fnb.sql
Make sure to install the dependencies:
# npm
npm install
Start the development server on http://localhost:3000
npm run dev
Build the application for production:
npm run build
Locally preview production build:
npm run preview
Checkout the deployment documentation for more information.