Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
67 lines (52 loc) · 2.94 KB
/
Copy pathTaskfile.yml
File metadata and controls
67 lines (52 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# https://taskfile.dev
version: '3'
tasks:
docker-build-web:
desc: Build the tasknote-web prod-ready docker image, tagging it as candidate
cmd: docker build --no-cache --build-arg VITE_BUILD="v999-$(date '+%Y-%m-%d-%H%M%S')" --build-arg SOURCE_PR="v999-123456789-$(date '+%Y-%m-%d-%H%M%S')" -t ghcr.io/thermcampos/tasknote/client:latest ./client
docker-build-api:
desc: Build the tasknote-api prod-ready docker image, tagging it as candidate
cmd: cd server && ./mvnw -Pnative -DskipTests spring-boot:build-image -Dspring-boot.build-image.imageName=ghcr.io/thermcampos/tasknote/server:latest -Dspring-boot.build-image.builder=paketobuildpacks/builder-jammy-tiny:0.0.560
db-up:
desc: Starts Postgres database container
cmd: export NGROK_AUTHTOKEN=1 && docker compose -f compose.dev.yaml up -d tasknote-db
db-down:
desc: Stops and remove Postgres database container
cmd: export NGROK_AUTHTOKEN=1 && docker compose -f compose.dev.yaml down tasknote-db -v --remove-orphans
schemaspy-up:
desc: Starts database, API, SchemaSpy containers and a Python http server
cmd: docker compose -f compose.schemaspy.yaml up -d
schemaspy-down:
desc: Stops and remove database, API, SchemaSpy and the Python http server
cmd: docker compose -f compose.schemaspy.yaml down -v --remove-orphans
dev-up:
desc: Starts database, API and web app locally
cmd: doppler run --project tasknote --config dev -- docker compose -f compose.dev.yaml up -d
dev-down:
desc: Stops and remove database, API and web app containers
cmd: export NGROK_AUTHTOKEN=1 && docker compose -f compose.dev.yaml down -v --remove-orphans
prod-like-up:
desc: Starts Postgres, GraalVM API and Docker web app using prod images
cmd: docker compose -f compose.prod-like.yaml up -d
prod-like-down:
desc: Stops and remove Postgres, GraalVM API and Docker web app using prod images
cmd: docker compose -f compose.prod-like.yaml down -v --remove-orphans
test-api:
desc: Run all backend checks (checkstyle, build, unit and integration tests). Integration tests run on Testcontainers PostgreSQL, so Docker is required
cmd: bash tools/check-backend.sh
test-api-unit:
desc: Run backend unit tests only (no Docker required)
cmd: cd server && ./mvnw --no-transfer-progress test -P tests -Dskip.integration.tests=true
test-api-it:
desc: Run backend integration tests only (Testcontainers PostgreSQL, Docker required)
cmd: cd server && ./mvnw --no-transfer-progress verify -P tests -Dskip.unit.tests=true -Djacoco.skip=true -Dcheckstyle.skip=true
run-native-tracing:
desc: Buidl and run with native agent to trace reflections
deps: [db-up]
cmds:
- |
cd server && \
./mvnw clean package -DskipTests && \
doppler run --project tasknote --config dev -- java \
-agentlib:native-image-agent=config-output-dir=src/main/resources/META-INF/native-image \
-jar target/tasknote-api.jar