tangled
alpha
login
or
join now
kacaii.dev
/
senac-brigade-server
0
fork
atom
wip: currently rewriting the project as a full stack application
tangled.org/kacaii.dev/sigo
gleam
0
fork
atom
overview
issues
1
pulls
pipelines
use `docker compose` to run the database
kacaii.dev
2 months ago
2cb63561
358e1ed7
0/1
lint.yml
failed
25s
+6
-18
1 changed file
expand all
collapse all
unified
split
.justfiles
postgres.just
+6
-18
.justfiles/postgres.just
···
2
2
3
3
docker := require("docker")
4
4
psql := require("psql")
5
5
-
6
6
-
#
7
7
-
8
5
database_url := env("DATABASE_URL")
9
9
-
postgres_db := env("POSTGRES_DB")
10
10
-
postgres_password := env("POSTGRES_PASSWORD")
11
11
-
postgres_user := env("POSTGRES_USER")
12
12
-
13
13
-
#
14
14
-
15
15
-
image := "postgres:18-alpine"
16
16
-
port := "5432"
17
6
18
7
# List available recipes
19
8
default:
20
9
just --list db
21
10
22
11
# Run the DataBase container
23
23
-
run-database-container:
24
24
-
{{ docker }} run --rm --name postgres \
25
25
-
-e POSTGRES_USER={{ postgres_user }} \
26
26
-
-e POSTGRES_PASSWORD={{ postgres_password }} \
27
27
-
-e POSTGRES_DB={{ postgres_db }} \
28
28
-
-p {{ port }}:5432 \
29
29
-
-d {{ image }}
12
12
+
run-container:
13
13
+
{{ docker }} compose --profile db up -d
14
14
+
15
15
+
# Stop the DataBase container
16
16
+
stop-container:
17
17
+
{{ docker }} compose --profile db down
30
18
31
19
# Rebuild the database empty
32
20
[no-cd]