Quick start ΒΆ
-
Initialize new
.env
file:cp .env.example .env
Tip
Change the web port from 7780 to something unsused if you have a port conflict. If you do this though, be aware that you will see CORS errors from the public tiles server and will need to either use your own CORS-enabling proxy or ask for your preferred port to be added to the production ingress annotations
Change the MailHog web port from 8725 to something unsused if you have a port conflict.
If you have another Postgres running on 5432, add a line to your .env like
FORWARD_DB_PORT=5433
-
Configure
.env
to use online/remote database and map tiles so you can skip loading data and building tiles locally:DB_HOST=WORKSTATION_LAN_IP DB_PORT=5433 DB_USERNAME=read_only DB_PASSWORD=FROM_BITWARDEN
The password is available in BitWarden under the entry
read_only @ postgresql
Note
Your WORKSTATION_LAN_IP should start with
192.
or10.
and can be found withhostname -I
on Linux andifconfig
on mac.Note
The above configuration points
DB_PORT
at 5433 because we’ll be opening a tunnel from there to the online/remote database with thekubectl port-forward
command in step 4.We use that port to avoid conflict with the local PostgreSQL instance step 5 will still spin up on the default port 5432, but which we will be ignoring and not loading any data into.
Note
If using Windows + WSL2 + Docker, then
DB_HOST=host.docker.internal
. All other steps with Windows + WSL2 + Docker should be the same. -
Use Docker to install PHP dependencies:
docker run -ti --rm -v $(pwd):/app -w /app composer:2.0 composer install
-
Open a tunnel from the online PostgreSQL database to local port
5433
(if you modified the DB_PORT in step 2 you should change5433
below):export KUBECONFIG=~/.kube/letsplan-deployer.yaml DB_POD=$(kubectl get pod -l component=database -o jsonpath='{.items[0].metadata.name}') kubectl port-forward pods/$DB_POD --address 0.0.0.0 5433:5432
Download
letsplan-deployer.yaml
from theletsplan-deployer @ jarvus-live-cluster
entry in BitWarden -
Start local Docker environment with Laravel Sail:
./vendor/bin/sail up -d
-
Generate unique local app key:
./vendor/bin/sail artisan key:generate
-
Install frontend dependencies:
./vendor/bin/sail yarn install
-
Build frontend and watch for changes:
./vendor/bin/sail yarn watch
-
The server will now be running on http://localhost:7780