tangled
alpha
login
or
join now
kacaii.dev
/
sigo
0
fork
atom
๐ฉโ๐ Firefighters API written in Gleam!
lustre
gleam
0
fork
atom
overview
issues
pulls
pipelines
:art: organize recipes
kacaii.dev
1 week ago
300697c7
4e0d8c81
verified
This commit was signed with the committer's
known signature
.
kacaii.dev
SSH Key Fingerprint:
SHA256:n9v7QGNWHCUv1x/483hCtPUvTsVabU5PzC5CSJMUNtI=
+9
-15
1 changed file
expand all
collapse all
unified
split
justfile
+9
-15
justfile
···
41
test:
42
just server::test
43
44
-
# Clean pod resources
45
-
[group("podman")]
46
-
clean:
47
-
podman pod rm -f {{ pod_name }}
48
-
49
[group("podman")]
50
-
up:
51
-
just create-pod
52
-
just init-database
53
-
just build-backend
54
-
just init-backend
55
@echo {{ GREEN }}"Listening on http://0.0.0.0:8000"{{ NORMAL }}
56
0
57
[group("podman")]
58
down:
0
59
podman pod stop {{ pod_name }}
60
podman pod rm {{ pod_name }}
61
62
# Init the database container
63
[group("podman")]
64
-
@init-database:
65
podman run -d --pod {{ pod_name }} --name postgres-database {{ pg_env }} \
66
{{ pg_health_cmd }} {{ pg_health_conf }} {{ pg_health_start_period }} \
67
{{ pg_volume }} {{ pg_image }}
68
69
# Init the application container
70
[group("podman")]
71
-
@init-backend:
72
podman run -d \
73
--pod {{ pod_name }} \
74
--name backend \
···
77
78
# Build application container
79
[group("podman")]
80
-
@build-backend:
81
-
podman build -t backend .
82
83
# Create pod
84
[group("podman")]
85
-
@create-pod:
86
podman pod exists {{ pod_name }} ||\
87
podman pod create \
88
--name {{ pod_name }} \
···
41
test:
42
just server::test
43
44
+
# Start all containers
0
0
0
0
45
[group("podman")]
46
+
up: _create-pod init-database init-backend
0
0
0
0
47
@echo {{ GREEN }}"Listening on http://0.0.0.0:8000"{{ NORMAL }}
48
49
+
# Stops the application and free resources
50
[group("podman")]
51
down:
52
+
podman pod exists {{ pod_name }} || false
53
podman pod stop {{ pod_name }}
54
podman pod rm {{ pod_name }}
55
56
# Init the database container
57
[group("podman")]
58
+
@init-database: _create-pod
59
podman run -d --pod {{ pod_name }} --name postgres-database {{ pg_env }} \
60
{{ pg_health_cmd }} {{ pg_health_conf }} {{ pg_health_start_period }} \
61
{{ pg_volume }} {{ pg_image }}
62
63
# Init the application container
64
[group("podman")]
65
+
@init-backend: _create-pod _build-backend
66
podman run -d \
67
--pod {{ pod_name }} \
68
--name backend \
···
71
72
# Build application container
73
[group("podman")]
74
+
_build-backend:
75
+
@podman build -t backend .
76
77
# Create pod
78
[group("podman")]
79
+
@_create-pod:
80
podman pod exists {{ pod_name }} ||\
81
podman pod create \
82
--name {{ pod_name }} \