Quick start ΒΆ
-
Initialize new
.envfile:cp .env.example .envTip
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
.envto 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_BITWARDENThe password is available in BitWarden under the entry
read_only @ postgresqlNote
Your WORKSTATION_LAN_IP should start with
192.or10.and can be found withhostname -Ion Linux andifconfigon mac.Note
The above configuration points
DB_PORTat 5433 because we’ll be opening a tunnel from there to the online/remote database with thekubectl port-forwardcommand 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 change5433below):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:5432Download
letsplan-deployer.yamlfrom theletsplan-deployer @ jarvus-live-clusterentry 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