Installation (Source)
Please note, you should be familiar with linux server setup.
Bar Assistant is made with Laravel, you can check out default laravel requirements here. A few extra prerequisites are:
- You have
git
installed - You have installed PHP >= 8.3 with the following extensions:
- ffi
- opcache
- redis
- zip
- sqlite
- bcmath
- int
- You have Composer installed
- You have
sqlite3
installed - You have meilisearch running somewhere.
- (Optional) You have Redis server instance running
1. Setup the API
Clone the bar-assistant repository and create .env
file.
.env
# Your application instance URL
APP_URL=
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
CACHE_DRIVER=redis
SESSION_DRIVER=redis
2. Install dependencies
Use Composer to install the required dependencies.
3. Setup the rest of the application
Now you should be able to use artisan
commands to setup the rest of the application.
# Generate a key
php artisan key:generate
# To setup the database:
php artisan migrate --force
# To setup correct image paths
php artisan storage:link
# Clear config cache so new ENV settings get picked up
php artisan config:clear
# Setup search engine
php artisan bar:setup-meilisearch
php artisan scout:sync-index-settings
# Warmup cache
php artisan config:cache
php artisan route:cache
php artisan event:cache
# Clear expired tokens
php artisan sanctum:prune-expired --hours=24
# Sync base recipes
git clone --depth 1 --branch v5 https://github.com/bar-assistant/data.git resources/data
You can now configure your webserver to serve the PHP files from the public
folder. An example config with ngnix is available here.
4. Install web client
After cloning the Salt Rim repository do the following.
- Install dependencies with
npm install
- Add a config file to public folder:
public/config.js
- Build for production by running
npm run build
- Now you have a
dist/
folder. You can configure your webserver to serve static files from this folder.