|
All checks were successful
CI / deploy (push) Successful in 1s
Matches the deploy-webhook pattern used by the other app repos, minus the build/test jobs since this repo has no application code — just off-the-shelf images in a compose file. |
||
|---|---|---|
| .forgejo/workflows | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.yml | ||
| README.md | ||
shared-services
Shared, non-app-specific backing services used by more than one app: Meilisearch, MariaDB, PostgreSQL, Redis, and InfluxDB. Each service gets its own external network and named volume, so apps attach only to the ones they actually need.
cp .env.example .env # then fill in every *_PASSWORD / *_KEY value
docker compose up -d
Meilisearch
Owns the meili-shared external network. No host port is published; it's reachable only from containers on that network.
- Connect from an app with
MEILI_HOST=http://meilisearch:7700andMEILI_API_KEY=<MEILI_MASTER_KEY>. - Data persists in the
meili_datavolume. - One instance, one index per app — use your own index name in each app's Meilisearch client code.
MariaDB
Owns the mariadb-shared external network.
- Connect from an app with a
mariadb-sharednetwork attachment, hostmariadb-shared-db, and the root credentials (or a per-app user you create yourself). - Data persists in the
mariadbdatavolume.
PostgreSQL
Owns the pg-shared external network (compose service/network key is postgres-shared).
- Connect from an app with a
pg-sharednetwork attachment, hostpg-shared-db,POSTGRES_USER/POSTGRES_PASSWORD. - Data persists in the
pgdatavolume.
Redis
Owns the redis-shared external network.
- Connect from an app with a
redis-sharednetwork attachment, hostredis-shared-db, andREDIS_PASSWORD. - Data persists in the
redisdatavolume. - RedisInsight (a web UI for browsing keys) is published on
127.0.0.1:5540— loopback only, since it has no built-in auth of its own and would otherwise give full read/write access to every app's Redis data to anyone who finds the port. Use an SSH tunnel (ssh -L 5540:localhost:5540 <host>) for remote access.
InfluxDB
Owns the influxdb-shared external network, plus 127.0.0.1:8086 on the host — loopback-only, not reachable from the LAN. That's for the evcc-influx-aggregate.sh cron job, which runs directly on the host (not in a container) and has no other way to reach a container-network-only service; it already connects via localhost, so no config change needed there. Containers should use the Docker network instead of this port.
- Connect from an app with an
influxdb-sharednetwork attachment, hostinfluxdb-shared-db, port8086, and theINFLUXDB_ADMIN_USER/INFLUXDB_ADMIN_PASSWORDcredentials. - Data persists in the
influxdbdatavolume — this reuses the pre-existinginfluxdb_influxdb-datavolume from evcc's original standalone InfluxDB stack, so history isn't lost by moving it here. - Currently single-tenant (just the
evccdatabase from that migration) — InfluxDB 1.8 supports multiple databases on one instance, so additional apps can add their ownINFLUXDB_DBrather than needing a second instance.
Adding another app
- Add the relevant network(s) above as
external: truein the app'sdocker-compose.yml. - Give the app the matching host/credential env vars.
- Don't publish DB ports on the app side — connectivity goes over the shared Docker network only.
Maintenance
docker compose logs <service>for troubleshooting.- MariaDB/PostgreSQL/InfluxDB only consult their root/admin password env var on first init of an empty volume; changing it later has no effect on an already-initialized database. Redis re-applies
REDIS_PASSWORDon every start (via--requirepass), so it must stay in sync with whatever clients already use to authenticate.