When running `finance` image's `import` command (but only when
container's hledger-flow coinbase/coinbase-pro accounts are imported),
the following error is given:
```
IsADirectoryError: [Errno 21] Is a directory: '/etc/timezone'
Selector name 'id' does not exist as a named header in the given CSV data.
```
specifically, after enabling verbose printing of `csvjoin` (which is only
used within these accounts), the following error is given:
```
File "/home/user/.local/share/pipx/venvs/csvkit/lib/python3.12/site-packages/babel/localtime/_unix.py", line 57, in _get_localzone
with open(tzpath, 'rb') as tzfile:
^^^^^^^^^^^^^^^^^^
```
where all errors prevent the successful import of applicable accounts.
The python error appears to have been introduced in csvkit 2.0.0 and
appears to be the result of an upstream decision (or bug) to not test
whether /etc/timezone is a directory or a file (Arch Linux treats
/etc/timezone as a directory).
Fortunately, docker-finance's mounting of /etc/localtime appears to
satisfy use-case requirements; so, /etc/timezone is no longer needed.
Removing /etc/timezone resolves all errors.
55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
# docker-finance | modern accounting for the power-user
|
|
#
|
|
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
services:
|
|
docker-finance:
|
|
image: @DOCKER_FINANCE_IMAGE@
|
|
container_name: @DOCKER_FINANCE_CONTAINER@
|
|
build: .
|
|
volumes:
|
|
#
|
|
# NOTE: using DOCKER_FINANCE_CLIENT_REPO on both ends because:
|
|
#
|
|
# 1. Linter requires a transparent bind-mount from the client
|
|
# 2. There's no use-case for custom container configurations
|
|
#
|
|
- ${DOCKER_FINANCE_CLIENT_REPO}/docker-finance.dox:${DOCKER_FINANCE_CLIENT_REPO}/docker-finance.dox
|
|
- ${DOCKER_FINANCE_CLIENT_REPO}/client:${DOCKER_FINANCE_CLIENT_REPO}/client
|
|
- ${DOCKER_FINANCE_CLIENT_REPO}/container:${DOCKER_FINANCE_CLIENT_REPO}/container
|
|
- /etc/localtime:/etc/localtime:ro
|
|
environment:
|
|
- DOCKER_FINANCE_CLIENT_REPO=${DOCKER_FINANCE_CLIENT_REPO}
|
|
- DOCKER_FINANCE_VERSION=${DOCKER_FINANCE_VERSION}
|
|
- GID=${DOCKER_FINANCE_GID}
|
|
- UID=${DOCKER_FINANCE_UID}
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: ${DOCKER_FINANCE_CPUS}
|
|
memory: ${DOCKER_FINANCE_MEMORY}
|
|
restart: on-failure
|
|
init: true
|
|
networks:
|
|
docker-finance:
|
|
|
|
networks:
|
|
docker-finance:
|
|
external: true
|
|
name: @DOCKER_FINANCE_NETWORK@
|
|
|
|
# vim: sw=2 sts=2 si ai et
|