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