Commit Graph

116 Commits

Author SHA1 Message Date
c3cf81572b client: src: refactor system checks
- UID and dependency checks are done in internal `lib_docker`/`lib_env`
- Moves `sed` check to appropriate `lib_env`
2024-09-22 19:35:22 -07:00
d8222c60fb client: src: refactor environment/gen handler
- Moves environment handling from `lib_gen` to `lib_env`
- Related refactoring
2024-09-22 19:35:22 -07:00
6d0a38f6b5 client: manifest: update to latest impl 2024-09-17 20:06:33 -07:00
e7d749ba22 client: docker-finance.d: Dockerfiles: cleanup, clarify 2024-09-17 20:06:33 -07:00
dc4990ab90 client: docker: complete build overhaul, optimize
This commit brings a complete overhaul of the build system:

- Creates a separation of concerns for 'local' and 'remote' building
  * 'local' is built locally via the docker-finance `build` command
  * 'remote' is built *outside* of the docker-finance `build` command
    (pushed to a remote registry and then pulled by the 'local' build)
  * Related refactoring
    - Dockerfiles
    - `lib_gen`

- Adds remote image 'hledger-suite'
  * Provides the latest versions of all `hledger` related binaries
  * No longer relies on package maintainers / out-dated packages

- Adds remote image 'docker-finance'
  * Provides base image for 'finance' and 'dev-tools' images
    - tags 'archlinux' | 'ubuntu' | 'dev-tools'

- Removes previous `hledger` related build modules
  * Removes building any `hledger` related binaries locally

- Removes 'experimental' build
  * End-user can use local custom Dockerfile and/or custom tag instead

- Updates the 'default' | 'slim' | 'tiny' | 'micro' build types
  * Refactors build type requirements into separate build modules
    - Adds 'fetch' module
    - Adds 'track' module
    - Adds 'user' module
      * creates container user *after* base and all other modules
      * allows for quick re-building across multiple local users
    - Updates 'root' module
  * `lib_docker`
    - Updates usage help
    - Adds build modules per build type

- Huge optimizations
  * Vastly improves build times
    - ~60% faster w/ a fresh build
    - ~60%-90% faster rebuild (depending on image type)
  * Vastly improves image sizes
    - e.g., 'default' Arch Linux image size is ~50% smaller
2024-09-17 20:06:33 -07:00
d4d7027f22 client: dev-tools: lib_linter: add DOCKER_FINANCE_CLIENT_PLUGINS 2024-09-07 18:46:39 -07:00
75ed30a05d client: Dockerfiles: dev-tools: add DOCKER_FINANCE_CLIENT_PLUGINS 2024-09-07 16:48:27 -07:00
7e5355992b client: docker-finance.d: env: dev-tools: allow DOCKER_FINANCE_CLIENT_PLUGINS 2024-09-07 16:48:10 -07:00
d8cc3c097f client: docker: lib_plugins: allow path depth
- Allows plugins to function within subdirectories
- Removes redundant arg checking
2024-09-04 18:17:13 -07:00
1e818b708b client: dev-tools: lib_linter: return compose down
- Don't return value of network removal
  * compose value is more appropriate
- Silence error warning
  * will complain if network is already in use
2024-08-21 20:24:43 -07:00
a9e2976748 client: Dockerfiles: optimize by moving useradd
Adding the finance user as late as possible within the base Dockerfile
will allow for faster build times when rebuilding with different users
(the base layers won't need to be rebuilt).
2024-08-20 17:40:23 -07:00
3519c690bd client: manifest: bump version to v1.0.0-beta.3 2024-08-20 16:40:23 -07:00
01ab9da53d client: lib_docker: remove platform from network name
There should be a single network amongst all docker-finance containers.
2024-08-19 22:43:57 -07:00
623c3f9e1a client: lib_docker: add tag to container name
Helps identify environment/build type during runtime.
2024-08-19 22:43:57 -07:00
b4fcc2ae0d client: Dockerfiles: comment all optional userspace packages
- Shouldn't be applied to base image by default
- Also removes `mc` from Ubuntu image as `mc` (more useful client-side)
2024-08-19 15:57:54 -07:00
284dd1d607 client: Dockerfiles: add commented pipx optional userspace
- `pipx` is no longer required by the base image
  * Package would be required for previous `xlsx2csv` install
2024-08-19 15:57:54 -07:00
37a4a630d9 client: manifest: remove pipx, replace with packaged csvkit 2024-08-19 15:57:54 -07:00
3b01ce8cc7 client: Dockerfiles: remove pipx, replace with packaged csvkit 2024-08-19 15:57:54 -07:00
bd3dec6a94 client: lib_docker: version: refactor to use yq
Replaces `shyaml` dependency with `yq`.
2024-08-17 23:19:57 -07:00
c82300b629 client: manifest: dev-tools: add yq 2024-08-17 23:19:57 -07:00
569db8a1e6 client: Dockerfiles: dev-tools: refactor to use yq
Replaces `shyaml` dependency with `yq`.
2024-08-17 23:19:57 -07:00
1402284f2b client: manifest: remove shyaml package, add yq 2024-08-17 19:36:48 -07:00
237a4c20ab client: Dockerfiles: remove shyaml package, add yq
- Replaces `shyaml` dependency with `yq`
  * Less dependency upon `pipx` (`csvcut` is next to go)
  * `yq` will be needed by a container plugin
2024-08-17 19:36:47 -07:00
9e8a448640 client: plugins: catch lib_docker ctor (Tor plugin)
- Catch if lib_docker constructor fails
- Add note regarding construction
2024-08-15 23:53:58 -07:00
0e2062128b client: plugins: refactor example plugin
- Dynamically construct instance
  * Platform and tag should not be hard-coded
- Add note regarding construction
- Refactor main()
2024-08-15 23:23:37 -07:00
5e59087390 client: docker.bash: add Tor plugin to usage help 2024-08-15 21:31:54 -07:00
c475dbdbc7 client: manifest: add proxychains-ng package 2024-08-15 21:31:54 -07:00
5b4bf6fbd0 client: plugins: implement Tor plugin (tor.bash)
- Creates, prepares and manages containerized Tor instance
- Prepares a running docker-finance container to proxy
  (`proxychains-ng`) through the containerized Tor instance
2024-08-15 21:31:53 -07:00
59d11b47d3 client: Dockerfiles: add proxychains-ng package
Needed for Tor support (and any potential future proxy support).
2024-08-14 21:35:25 -07:00
d7caec13e4 client/container: disable shellcheck warning for DOCKER_FINANCE_DEBUG
If it's not set or set to false, then it's expected to be not true.
2024-08-14 20:03:03 -07:00
5684d94d63 client: completion.bash: set xtrace if debug enabled 2024-08-14 19:40:55 -07:00
4302ac2bb5 client: docker.bash: set xtrace if debug enabled 2024-08-14 19:40:55 -07:00
fcc0b95061 client: docker-finance.d: subprofile: clarify hledger
Since inception, the intent was to abstract the "interface" to allow for
a general-purpose CLI accounting ledger. However, there appears to be
confusion about whether the underlying implementation is `ledger`
accounting software or `hledger` accounting software.

So, making it clearer that it's `hledger` accounting software (although,
will continue to keep the `ledger` command for backwards-compatibility).
2024-08-14 19:36:53 -07:00
5da89e19fb client: docker-finance.d: env: change default $DOCKER_FINANCE_*_FLOW
The previous 'hledger-flow' directory was originally dedicated to
hledger-flow data. The directory has now expanded into a full-fledged
bind-mounted volume for all end-user flow / `finance`-generated data.

Ergo, 'finance-flow' is now more appropriate.
2024-08-14 19:31:31 -07:00
ed68a87283 client: Doxygen: change 'modules' to 'topics'
Renamed to 'topics' in light of Doxygen 1.9.8's C++20 modules support.
2024-08-14 19:28:05 -07:00
03d7234fd4 client: Doxygen: bump Doxyfile to 1.9.8 2024-08-14 19:28:05 -07:00
83e5622451 client: completion: complete docker images by $USER
Simplifies completion on multi-user systems.
2024-08-12 19:58:13 -07:00
e7725b72fd client: completion: fix/optimize docker images
- Reduces overhead, catches all docker-finance images
- Previously wouldn't catch all space between image name and tag
2024-08-12 19:58:06 -07:00
eb2e17fe2d client: lib_linter: add more C++ extensions
Needed for linting `root` C++ plugins.
2024-08-12 18:59:51 -07:00
7cf129f607 client: Doxygen: add cpp_plugins group 2024-08-12 18:59:51 -07:00
082b946956 client: docker-finance.d: add plugins support 2024-08-12 18:36:27 -07:00
682fbe2f03 client: completion: add plugins support 2024-08-12 18:36:27 -07:00
52c958b927 client: lib_docker: refactor for library support (plugins)
- Exports globals to caller for "library" support (export to `plugins`, etc.)

- Removes enforcement of initializing "constructor" with 2nd arg (`command`)
  * Arg not needed since external/internal checks already in place
  * Context specific: if needed, caller should always check if set
  * Removal needed so library can be used within a library context

- `basename` fix to allow for bash completion
2024-08-12 18:36:26 -07:00
9c181b75a1 client: add plugins feature 2024-08-12 18:36:26 -07:00
720eec8a14 client: add lib_plugins
- Allows client-side execution of repo/custom client plugins
- A client-side equivalent of container's lib_plugins
2024-08-12 18:36:26 -07:00
bbb5d7c238 client: Dockerfiles: add plugins env to docker-compose 2024-08-12 18:36:26 -07:00
8a6ea479e2 client: plugins: docker: add example 2024-08-12 18:36:26 -07:00
01737d37bf client: lib_gen: new custom plugin layout, update example plugin
- Generates new custom plugin directory layout upon `gen`
  * Allows for drop-in client-side/container-side custom plugins

- Moved container plugin example into container's plugins
  * Plugin is no longer generated upon `gen` (it's available in-repo)

- Updates plugin example
    - Provides requisite lib_finance initialization
    - Refactored, added more checks
    - Expand example case
    - Linter fixes
2024-08-12 18:30:45 -07:00
923a9eee24 client: lib_gen: generate 'times'
- Sets a location for:
  * timew database
  * Anything time-related (among all profiles)
2024-08-09 00:01:48 -07:00
6da9b71030 client: manifest: add timew package 2024-08-09 00:01:46 -07:00