mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 16:56:33 +00:00
fix(deploy): move docker-compose.yml to repo root
Coolify passes --project-directory <repo-root> so relative paths in compose resolved from there, not from the compose file's directory. context: ../.. then climbed to / and lstat /deploy failed. Moving compose to repo root makes every relative path project-dir-relative regardless of who's invoking compose. Local 'docker compose up' from repo root and Coolify's --project-directory + -f both resolve identically. Coolify users: update the resource's compose path to 'docker-compose.yml' (was 'deploy/docker/docker-compose.yml'). Existing named volumes carry over since the named: directive keeps them.
This commit is contained in:
parent
f3c5504b4f
commit
a7abef1bba
3 changed files with 16 additions and 11 deletions
|
|
@ -29,9 +29,10 @@ BF_FIRMWARE_SIGNING_KEY= # paste Ed25519 PEM for stable signing key
|
|||
BF_MQTT_URL= # optional MQTT telemetry export
|
||||
```
|
||||
|
||||
In Coolify: create a Docker compose stack from `deploy/docker/docker-compose.yml`,
|
||||
inject the env vars, set a domain on the `angie` service. Backups via the admin
|
||||
UI (`/admin/backup`) — Coolify's S3 hook can pull these on a schedule.
|
||||
In Coolify: create a Docker compose stack pointing at the repo's
|
||||
`docker-compose.yml` (repo root), inject the env vars, set a domain on the
|
||||
`angie` service. Backups via the admin UI (`/admin/backup`) — Coolify's S3
|
||||
hook can pull these on a schedule.
|
||||
|
||||
### bf-client (kiosk Pi)
|
||||
|
||||
|
|
@ -53,7 +54,7 @@ proxy auth rules.
|
|||
|
||||
```bash
|
||||
cd /opt/betterframe
|
||||
docker compose -f deploy/docker/docker-compose.yml up -d --build
|
||||
docker compose up -d --build # from repo root
|
||||
```
|
||||
|
||||
Published:
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ fi
|
|||
# ----------------------------------------------------------------------------
|
||||
if [ "${INSTALL_SERVER}" = "1" ]; then
|
||||
echo "==> Building + starting Docker stack"
|
||||
run_as_user "cd '${REPO_ROOT}' && docker compose -f deploy/docker/docker-compose.yml up -d --build"
|
||||
run_as_user "cd '${REPO_ROOT}' && docker compose up -d --build"
|
||||
fi
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
# BetterFrame stack: server + Angie proxy + Node-RED.
|
||||
# Kiosk runs on the Pi natively (not in Docker, needs Wayland/HDMI).
|
||||
#
|
||||
# Lives at repo root by convention — Docker Compose + Coolify both default
|
||||
# to looking here. All paths are repo-root-relative so they resolve
|
||||
# identically whether compose is invoked with or without --project-directory.
|
||||
#
|
||||
# Usage:
|
||||
# docker compose -f deploy/docker/docker-compose.yml up -d --build
|
||||
# docker compose up -d --build # from repo root
|
||||
#
|
||||
# Volumes (override per-deployment via env — see Coolify "Environment"):
|
||||
# BF_DATA_VOLUME_NAME default "betterframe-data"
|
||||
|
|
@ -21,7 +25,7 @@ version: "3.8"
|
|||
services:
|
||||
server:
|
||||
build:
|
||||
context: ../..
|
||||
context: .
|
||||
dockerfile: deploy/docker/Dockerfile.server
|
||||
container_name: betterframe-server
|
||||
restart: unless-stopped
|
||||
|
|
@ -41,7 +45,7 @@ services:
|
|||
# - BF_MQTT_TOPIC_PREFIX=betterframe
|
||||
volumes:
|
||||
- betterframe-data:/var/lib/betterframe
|
||||
- ./sec-config.yaml:/app/server/sec-config.yaml:ro
|
||||
- ./deploy/docker/sec-config.yaml:/app/server/sec-config.yaml:ro
|
||||
expose:
|
||||
- "18080"
|
||||
- "18081"
|
||||
|
|
@ -65,13 +69,13 @@ services:
|
|||
ports:
|
||||
- "${BF_HOST_PORT:-80}:80"
|
||||
volumes:
|
||||
- ../angie/betterframe.docker.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- ./deploy/angie/betterframe.docker.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
networks:
|
||||
- betterframe
|
||||
|
||||
nodered:
|
||||
build:
|
||||
context: ../..
|
||||
context: .
|
||||
dockerfile: deploy/docker/Dockerfile.nodered
|
||||
container_name: betterframe-nodered
|
||||
restart: unless-stopped
|
||||
|
|
@ -79,7 +83,7 @@ services:
|
|||
- TZ=UTC
|
||||
volumes:
|
||||
- nodered-data:/data
|
||||
- ./nodered-settings.js:/data/settings.js:ro
|
||||
- ./deploy/docker/nodered-settings.js:/data/settings.js:ro
|
||||
expose:
|
||||
- "1880"
|
||||
healthcheck:
|
||||
Loading…
Reference in a new issue