Janna's Gallery is an application created to showcase the amazing artwork and books created by Janna. It provides a visually appealing and organized way to present her creations to the world.
To start the application locally, run the following commands:
-
Download PocketBase:
make pocketbase-download
This downloads and extracts the PocketBase binary into the
pocketbase/
directory. -
Run the frontend:
make app-run
This starts the Vite development server, which serves the React app locally.
-
Run PocketBase:
make pocketbase-run
This starts the PocketBase backend server locally, allowing API requests to be handled.
To deploy the application, use the following commands:
-
Deploy the frontend:
make app-deploy
This builds the frontend with Vite and deploys the
dist/
folder to the server. -
Deploy PocketBase:
make pocketbase-deploy
This syncs the PocketBase files and migrations to the server, and runs database migrations.
-
Nginx: The Nginx configuration file is located in
infra/nginx.conf
and is responsible for serving the website and proxying requests to the PocketBase backend:/
(Root location): Serves static files from thedist/
directory (frontend build)./pb
(Proxy to PocketBase): Proxies API requests to PocketBase running on127.0.0.1:8090
. This is where the app interacts with the backend for data storage and retrieval.
-
Systemd Service: The PocketBase server is managed as a systemd service for automatic startup and monitoring.
- Copy
infra/pocketbase.service
to/etc/systemd/system/pocketbase-janna.service
. - Enable and start the PocketBase server:
sudo systemctl enable pocketbase-janna sudo systemctl start pocketbase-janna
- Copy