diff --git a/.justfile b/.justfile index 1744558..36f73d9 100644 --- a/.justfile +++ b/.justfile @@ -23,6 +23,3 @@ deploy: clean: podman system prune --build cargo clean - -bump: - cog bump --auto diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 6673aca..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,51 +0,0 @@ -# Changelog -All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. - -- - - -## 0.1.0 - 2025-04-15 -#### Bug Fixes -- prevent crash of ci due to artifacts upload - (e0b259c) - aleidk -- gracefully handle no db password - (b22a5e5) - aleidk -- embedded templates path on build - (8e1e366) - aleidk -#### Build system -- simplify build & run process of FE files - (6ee3457) - aleidk -- add actions workflow for release - (9d2dc81) - aleidk -- update dockerfile - (29756b9) - aleidk -- add docker build files - (3c2d3cf) - aleidk -#### Features -- add basic configuration support - (3ff1f26) - aleidk -- add mini-strap components - (e59ae1f) - aleidk -- add basic htmx example - (ffca617) - aleidk -- add htmx package - (17bf419) - aleidk -- add sqlx transaction extractor to router - (a662b94) - aleidk -- add sqlx basic config - (48afdac) - aleidk -- add frontend compilation task with bun - (6b7642b) - aleidk -- add minijinja as template engine - (6cb75aa) - aleidk -- add error handling - (8d8388e) - aleidk -- add basic template functionality - (6bf3947) - aleidk -- add axium hello world - (0923ac1) - aleidk -- add database service as dev dependency - (ca2ea91) - aleidk -#### Miscellaneous Chores -- update bump tasks - (c535ee2) - aleidk -- remove unecesary dependencies - (48b0252) - aleidk -- add build steps to justfile - (e379967) - aleidk -- remove ci pipelines - (ba51990) - aleidk -- add semantic version to pipeline - (5bd421f) - aleidk -- fix restart when updating frontend files - (56a9c7b) - aleidk -- add tracing logs - (5a9b871) - aleidk -- add live reload features - (b6c909f) - aleidk -- init cargo project - (5362d2b) - aleidk -- initial commit - (7e331ee) - alecodes -#### Refactoring -- update dockerfile build - (d5e4886) - aleidk -- change migration tool to sqlx - (49c8682) - aleidk -- change css library to picocss - (27037a9) - aleidk -- change asset handling - (1871610) - aleidk -- build fronend via cli to allow watch mode - (e0e8700) - aleidk -- re-structure frontend code - (3e0dd79) - aleidk -#### Revert -- refactor: build fronend via cli to allow watch mode - (cfaf7ec) - aleidk - -- - - - -Changelog generated by [cocogitto](https://github.com/cocogitto/cocogitto). \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 4994ada..fbbfed8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,16 @@ FROM bun AS js-deps COPY package.json bun.lock /temp/dev/ RUN cd /temp/dev && bun install --frozen-lockfile +# copy node_modules from temp directory +# then copy all (non-ignored) project files into the image +FROM bun AS js-bundler +COPY --from=js-deps /temp/dev/node_modules node_modules +COPY frontend frontend +COPY .devfiles/scripts/build-frontend.ts .devfiles/scripts/build-frontend.ts + +ENV NODE_ENV=production +RUN bun ./.devfiles/scripts/build-frontend.ts + # ── Rust ──────────────────────────────────────────────────────────────── FROM rust:slim AS builder @@ -26,9 +36,9 @@ RUN adduser \ --uid 10001 \ appuser +COPY --from=js-bundler /usr/src/app/dist dist + COPY . . -COPY --from=js-deps /usr/local/bin/bun /usr/local/bin/bun -COPY --from=js-deps /temp/dev/node_modules node_modules RUN --mount=type=cache,target=/app/target/ \ --mount=type=cache,target=/usr/local/cargo/git/db \ diff --git a/cog.toml b/cog.toml index 7d3f06a..e1f8ae4 100644 --- a/cog.toml +++ b/cog.toml @@ -9,7 +9,7 @@ skip_ci = "[skip ci]" skip_untracked = false pre_bump_hooks = [ "sed -E -i 's/(\"version\":) \"[0-9.]{5}\"/\\1 \"{{version|0.0.1}}\"/gi' package.json", - "just publish", + "cargo build --release", "echo 'bumping from {{latest|0.0.0}} to {{version|0.0.1}}'", "cargo bump {{version|0.0.1}}", ] diff --git a/package.json b/package.json index 5fbe37b..e8cb7aa 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "compendium", "module": "index.ts", - "version": "0.1.0", + "version": "0.0.0", "devDependencies": { "@alecodes/tmpl-build-and-load": "^0.1.3", "@types/bun": "latest"