๐Ÿ‘ฉโ€๐Ÿš’ Firefighters API written in Gleam!
lustre gleam

:bug: allow user to optionally run the backend outside the container

kacaii.dev cff3ec04 9beb427f

verified
+7 -1
+1
.env.example
··· 6 6 7 7 # ๎ฎ KEY 8 8 export SECRET_KEY="" 9 + export RUN_BACKEND_LOCALLY="true"
+6 -1
justfile
··· 16 16 pg_health_conf := "--health-interval 10s --health-retries 3 --health-timeout 5s" 17 17 pg_health_start_period := "--health-start-period 30s" 18 18 19 + # backend 20 + run_backend_locally := env("RUN_BACKEND_LOCALLY", "false") 21 + backend_port := if run_backend_locally == "false" { "-p 8000:8000" } else { "" } 22 + 19 23 # List available recipes 20 24 @_default: 21 25 just --list ··· 54 58 # ------------------------------------------------------------------------------ 55 59 56 60 # ๓ฐ– Create pod 61 + # Behavior can be changed using the `run_backend_locally` recipe variable 57 62 [group("podman")] 58 63 @create-pod: 59 64 podman pod exists {{ pod_name }} || \ 60 65 podman pod create \ 61 66 --name {{ pod_name }} \ 62 - -p 8000:8000 \ 67 + {{ backend_port }} \ 63 68 -p 5432:5432 64 69 65 70 # ๓ฐ– Build the backend container image