Commit Graph

34 Commits

Author SHA1 Message Date
JakobLichterfeld
fdf8185ce2 ci: add treefmt as code formatting multiplexer, refactor CI to avoid duplication, reorg CI into DevOps workflow (#4219)
* ci: add treefmt as code formatting multiplexer

* style: linter findings in entrypoint.sh script

* style: linter findings for yaml and yml

* style: linter findings for json files

* style: linter findings for nix files

* style: linter findings for js files

* style: linter findings for dashboards.sh

* style: linter findings for md and mdx files

* chore: remove unused clang formatter in treefmt config

* style: linter findings for mdx files

* ci: exclude Grafana dashboard JSON files from prettier formatting

* Revert "style: linter findings for json files"

This reverts commit f40c2e175992f66f887a3f4fc5aa1a1a89393147.

* ci: exclude Grafana dashboard JSON files from all formatting as we use the grafana export style

* style: linter findings for json files

* doc: update changelog

* ci(refactor): use composite action to avoid duplication in elixir workflow

* doc: update changelog

* ci: prevent workflow runs for certain conditions and allow scheduled runs

* ci(refactor): use reusable workflow to check paths

* ci(fix): correct output syntax for check_paths workflow and setting base branch

* ci(refactor): use reusable workflows for streamlined DevOps pipeline

* ci(fix): add write permission for packages in DevOps workflow

* ci(test): test DevOps workflow

* ci(test): test DevOps workflow

* ci(fix): Update condition for spell_check, ensure_linting, elixir, and ghcr_build workflows to reflect empty result instead of false

* ci: revert test DevOps

* ci(refactor): allow ghcr_build parallel to elixir test

* ci(refactor): Remove redundant check_paths job from elixir.yml, elixir_test.yml, and spell_check.yml workflows, check is done in devops.yml

* feat: add treefmt-nix to nix flake (#4219 - @JakobLichterfeld)

* ci: ensure proper linting via treefmt

* ci(test): test ensure_linting workflow

* ci(fix): checkout code for spell_checker to access file to check

* ci(fix): allow impure in ensure_linting workflow

* Revert "ci(test): test ensure_linting workflow"

This reverts commit a67b17ec098a628a8b093ec20b34b0e2696811cc.

* ci(fix): correct use of flake-utils for formatter and checks

Co-authored-by: scottbot95 <scottbot95@gmail.com>

* ci(fix): correct use of flake-utils for treefmt

Co-authored-by: scottbot95 <scottbot95@gmail.com>

* refactor: Remove unnecessary imports in flake

* ci(fix): correct syntax in flake

* ci(refactor): Remove unused code in flake.nix

* style: standardised style for input url in flake

* ci(fix): treefmt-nix config with existing options

* ci(feat): Add Nix binary cache and update treefmt command in CI workflow

* ci(refactor): Remove unused code in flake.nix

* fix: include devShell packages only on supported platforms

* fix: update hash for mix-deps package in flake.nix

* ci(fix): Update treefmt command in CI workflow

* ci(test): test ensure_linting workflow

* feat: ensure mix deps are present in devShell

* ci(feat): use flake-parts to enable treefmt-nix

* feat: use flake-parts

* fix: correct use of flake-parts for package build

* doc: update CI badge URL for devops workflow

* ci(fix): handle empty path filter output

* ci: remove --impure flag from treefmt command in CI workflow

* fix: correct treefmt.config settings in formatter.nix

* fix: correct flake-parts inputs, avoid with in imports

* fix: correct program name for mix-format in formatter.nix

* feat: devenv via flake-parts

* fix: correct use of legacy nix code with flake-parts

* ci(fix): correct nix develop command in ensure_linting.yml

* refactor: list imports explicitly in flake, rename folder to flake-modules to be precise

* style: use tabs for indent size to format sh

* style: use nixfmt-rfc-style

* Revert "style: use nixfmt-rfc-style"

This reverts commit 082056159e611c2c0639f8b4dc509446f5308a92.

* style: use nixfmt style

* fix: remove glibcLocales from optional dependencies to avoid  "A definition for option `packages."[definition 4-entry 16]"' is not of type `package'."

* fix: remove inotify-tools from optional dependencies to avoid  "A definition for option `packages."[definition 4-entry 16]"' is not of type `package'."

* fix: Remove inotify-tools and glibcLocales from optional dependencie

* fix: correct file paths in flake.nix to version

* fix: add ELIXIR_ERL_OPTIONS to shell environment to force utf8 locale

* fix: add LOCALE_ARCHIVE to shell environment in flake.nix

* Revert "fix: add LOCALE_ARCHIVE to shell environment in flake.nix"

This reverts commit d45f6e32eea1fcaf55cd03733e648cda4dbb764b.

* ci(refactor): rename workflow to elixir_dep_verification_and_static_analysis.yml to better reflect the intention,, remove duplicate checks

* ci(debug): debug locale settings

* Revert "ci(debug): debug locale settings"

This reverts commit 9b402f3c5f9b41ff4716dc4fc99f711fc9ef8135.

* Revert "fix: add ELIXIR_ERL_OPTIONS to shell environment to force utf8 locale"

This reverts commit d02419cba44055d55978ad36d23493d8790ce21b.

* fix: add LOCALE_ARCHIVE to shell environment in flake.nix

* Revert "fix: add LOCALE_ARCHIVE to shell environment in flake.nix"

This reverts commit 761b437e699d8381a0726dd969052b1e85c3f08f.

* fix: add LANG=C.UTF-8 to shell environment in flake.nix

* fix: add mix local.rebar and mix local.hex commands to flake.nix

* fix: pin devenv to version without unix socket bug

* chore: update nixpkgs to nixos-24.05 and update dependencies

* doc: add treefmt config comments

* ci: do not expose treefmt formatter programs in devshell

* fix: correct use of module option to enable PostgreSQL server in flake.nix

* Revert "chore: update nixpkgs to nixos-24.05 and update dependencies"

This reverts commit a6ea3f25aa393c32d9c2494b21e6330de2482496.

* feat: consistent use of erlang 26 and elixir 1_16 in flake

* ci: switch to macOS runner for linting workflow

* Revert "ci: do not expose treefmt formatter programs in devshell"

This reverts commit 1ecfa451dcf4199554a5d96d241ee846601862d9.

* Revert "ci: switch to macOS runner for linting workflow"

This reverts commit 7b430667d8737e5adf91f5ba59bbf83eb15bcb7a.

* ci: Remove nixpkgs channel specification in ensure_linting workflow

* ci(debug): Add debug output for PATH and NIX_PATH in flake.nix

* Revert "ci(debug): Add debug output for PATH and NIX_PATH in flake.nix"

This reverts commit 07faec5ddf88195969f89f3e74791d030c980b03.

* fix: avoid the need for impure for devenv

see #4245

* fix: remove invalid custom build.check for formatter and use default

* style: linter findings

* fix: Add emptyTest to avoid nix flake check test execution on non-Linux systems

* chore: Remove LANG=C.UTF-8 from enterShell in flake.nix

* ci(fix): Remove --impure flag from treefmt command in CI mode

* ci(fix): avoid impure mode in ensure_linting workflow

* style: linter findings

* ci(debug): debug elixir version and locale

* chore: Update flake.lock dependencies

* feat: use newer devenv as unix socket bug is fixed in upstream

https://github.com/cachix/devenv/issues/1497

* fix: set rebar3 path in devenv

* Revert "ci(debug): debug elixir version and locale"

This reverts commit 7ecdc77c163cd6ef9c913689c1f75e86ce8587cb.

* ci: re-enable path check in DevOps workflow

* doc: update Development and Contributing guide with nix and treefmt

* ci: use PostgreSQL 17

* style: linter findings

* ci(fix): ensure cache name in build action does not contain invalid characters to avoid invalid reference format

* doc: update changelog

* Revert "ci(fix): ensure cache name in build action does not contain invalid characters to avoid invalid reference format"

This reverts commit 02abb0359db4f22e5a28283476b3ced0d99729ff.

* ci: remove branch restriction for check_paths workflow to increase sec

* ci(fix): run ghcr build workflow only for specific conditions

- Ensure workflow only run if there are no changes to the .github folder
- Allow workflow to run on workflow call or PRs from forks
- Prevent duplicate runs for PRs from non-forks
- Avoid invalid reference format for cache name in PRs from our repository

* doc: update changelog

* fix: update hash for mix-deps package in flake.nix

* fix: disable flakeCheck for formatter, as mix format need the dep to be fetched beforehand

* ci(fix): run ghcr build workflow only for specific conditions

* fix: move nixosModules.default to top-level attribute set

* refactor: remove unnecessary config nesting in formatter.nix

* ci(fix): ensure version for buildx is set to correct name

---------

Co-authored-by: scottbot95 <scottbot95@gmail.com>
2024-10-14 08:54:10 +02:00
Matthias Wirtz
c67573e708 feat: PostgreSQL 17 (#4231) 2024-09-29 11:17:31 +02:00
JakobLichterfeld
fedb206f50 doc: clarify using fleet api has lots of drawbacks (#4173)
* doc: fix markdownlint warnings in fleet api documentation

* doc: update changelog

* doc: clarify using fleet api has lots of drawbacks
2024-08-31 16:32:15 +02:00
yangiak
92baa5a330 doc: add steps to the guide regarding how to switch to Fleet API (#4103)
* Added steps to the guide regarding how to switching from Owners API to Fleet API from my experience

* minor heading change adopted

---------

Co-authored-by: Yangkai Lyu <lyk119@gmail.com>
2024-07-28 09:21:19 +02:00
jlestel
2ca545aea3 doc: Documentation for new endpoint changes (#3978)
* Update docs

* Update for streaming

* Update guides and add a reference in the project page

* Update for readability

* readability

* format

* update fleet api price

* Update direct Tesla API part

---------

Co-authored-by: Julien <julien@citio.digital>
2024-07-02 15:47:29 +02:00
JakobLichterfeld
eaa518d8a5 doc: remove outdated, unsupported, unmaintained portainer doc (#3972)
* doc:remove outdated, unmaintained portainer doc

* doc: Remove unmaintained Portainer documentation

* doc: update changelog
2024-06-18 19:01:49 +02:00
Daniel Hansson
95d899dec7 feat: Upgrade PostgreSQL to v16 (#3884)
* Upgrade PostgreSQL to v16

Just tested, and seems to work!

* also add `pg_dumpall` as default command for backup

* revert pg_dumpall

* further version change

* further version change
2024-05-25 09:08:20 +02:00
Jakob Lichterfeld
ed6b4e7629 doc: version tag in docker-compose.yml is obsolete since docker 25.05
closes: #3761
2024-03-22 09:12:36 +01:00
PhracturedBlue
3cc0102090 Support listening on unix domain socket (#3328)
* Support connection on unix domain socket

* Better support for unix domain sockets

* Document Unix Domain sockets

* Fix typos caught by review
2024-01-29 13:43:45 +01:00
Justin Lee
294b7c7a85 update docker-compose.yml for Docker Compose version v2.24.1 (#3626) 2024-01-21 18:05:45 +01:00
Eden Yemini
c8b0df802f Docker compose command fixes (#3025)
* Replace `docker-compose` commands with `docker compose`

* Use official and up to date documentation for Docker and Compose installation

* Revert IDE automatic style changes

* Fix a dash from merging the upstream
2023-06-12 12:13:41 +02:00
Adrian Kumpf
b79a4544fb Bump recommended Postgres version to 15 2023-06-11 01:14:43 +02:00
Adrian Kumpf
a6bea752c8 Bump Docker images 2022-06-24 16:25:09 +02:00
Adrian Kumpf
0d6e288c70 Encrypt API tokens (#2360)
Store API tokens encrypted in the database.

During the database migration a randomly generated key will be used encrypt the tokens if no ENCRYPTION_KEY environment variable was provided.

If the application is started without the presence of an ENCRYPTION_KEY (or if the key failed to decrypt the existing tokens), the UI will display a warning with further instructions.
2022-02-18 17:03:13 +01:00
DrMichael
27dc029254 Added ProxyPreserveHost On to the Grafana entries in Apache2 config (#2471) 2022-02-18 14:21:57 +01:00
Adrian Kumpf
c0e4a0bee4 Update installation guides 2022-01-12 00:14:41 +01:00
Benoit Masson
59d81c8105 Update grafana rule to limit to teslamate host (#1937)
useful if you share an already running traefik or have multiple domain
2021-08-30 12:14:37 +02:00
Erik Billerby
a6a45ff325 Added a note about RAM needed after having issues, also a small clarification on where to place the .env file in the advanced guide. (#1857) 2021-07-24 12:37:30 +02:00
Adrian Kumpf
6cfb2a24cf Revert "postgres to alpine and runs on to latest ubuntu (#1576)"
This reverts commit 6050dc53f3.

The alpine images don't work on the Raspberry Pi because its package
sources contains an old version of libseccomp, which causes the time to
be at 1970: https://github.com/docker-library/postgres/issues/812
2021-05-03 16:39:49 +02:00
Adrian Kumpf
4284e04b05 Update Mosquitto version used in docker-compose examples 2021-05-03 11:30:21 +02:00
Tobias Lindberg
6050dc53f3 postgres to alpine and runs on to latest ubuntu (#1576)
* using ubuntu-latest instead of ubuntu-18.04

* appending -alpine to postgres

on workflow and in documentations

* Revert "using ubuntu-latest instead of ubuntu-18.04"

This reverts commit 7f84b1c99a6c25141b3f83034b67aa5a25ad3349.

Co-authored-by: Adrian Kumpf <8999358+adriankumpf@users.noreply.github.com>
2021-05-02 13:55:34 +02:00
Tobias Lindberg
97ac8f2b19 Bump traefik to v2.4 (#1496) 2021-03-31 23:20:56 +02:00
Tobias Lindberg
27e4117f4f Updating docks with minor things (#1287)
* removing user param from grafana section

* switching to Berlin as timezone

* updating htpass to BCrypt encryption mode
2021-02-03 17:56:23 +01:00
Juanky
b2654f0e63 Update apache.md (#1124)
Grafana needs its own certificate
2020-12-19 21:49:48 +01:00
Peter Boothby
19352545a8 updated traefik guide to use a single public hostname instead of two (#1101)
* Fix overlapping timestamps in Discrete map

Fix overlapping timestamps in Discrete map of state changes by adding 1 second to start times for charging_processes, drives and updates tables.

* Update traefik.md

Edited to show how to configure with a single public hostname instead of two as in the original guide.

* Lowercase header key

Co-authored-by: Adrian Kumpf <adrian.kumpf@posteo.de>
2020-12-01 17:49:30 +01:00
Adrian Kumpf
0831124f08 Update sample docker-compose configs 2020-10-05 12:25:49 +02:00
Adrian Kumpf
35add49583 Update Apache example config to not require auth for WS
Closes #952
2020-10-03 13:16:15 +02:00
Adrian Kumpf
daf29a5ac3 Update links to other documents 2020-07-26 13:25:14 +02:00
Adrian Kumpf
f234283baf Update docs 2020-04-26 10:00:44 +02:00
Adrian Kumpf
6dc03fdb21 Update traefik docs 2020-04-25 22:23:23 +02:00
Tobias Lindberg
e1609d5423 Fixing a few things in the docs.. (#611)
* adding swedish translation

* adding comments from endlish errors.po

* adding new translations for swedish

* fix #524 of adriankumpf/teslamate

* adding translation for geo-fence in swedish

* fixing translation of charge limit in swedish

* fixiing translation of mileage in swedish

* Fix typos

* adding swedish translations

* adjustment of swedish translation suggested by Thomas Hennig

* MQTT_HOST default should be 127.0.0.1 for screen, as in systemd

* adding drop_cap to traefik example, which all other guides have

* removing quotation marks around ports for portainer

* adjusting volumes for portainer to match other guides

Co-authored-by: Adrian Kumpf <adrian.kumpf@posteo.de>
2020-04-20 15:03:55 +02:00
oittaa
2d4971a5c6 traefik v2.2 (#603)
https://docs.traefik.io/v2.2/migration/v2/#v21-to-v22
2020-04-19 12:44:00 +02:00
DrMichael
4288e187c8 Add portainer to the documentation (#581)
* Create portainer

Created portainer installation description.

* Update portainer

* Update sidebars.js

Added portainer

* Rename portainer to portainer.md

* Update portainer.md

* Fix JSX syntax errors

Co-authored-by: Adrian Kumpf <adrian.kumpf@posteo.de>
2020-04-14 11:51:47 +02:00
Adrian Kumpf
adca2fc4f4 Update docs 2020-04-11 16:07:09 +02:00