Files
pipelines/compose.yaml
T

88 lines
2.9 KiB
YAML

services:
pipelines:
build: .
user: "${PIPELINES_UID:-10001}:${PIPELINES_GID:-10001}"
init: true
restart: unless-stopped
stop_grace_period: 60s
depends_on:
ntfy:
condition: service_healthy
environment:
TZ: ${TZ:?Set TZ to your host timezone; scripts/configure-compose.py detects it}
PIPELINES_NTFY_URL: http://ntfy/pipelines
PIPELINES_NTFY_PUBLIC_URL: ${NTFY_BASE_URL:?Set the address your Android phone can reach}
PIPELINES_NTFY_TOKEN_FILE: /run/secrets/ntfy_token
PIPELINES_DEFAULT_MODEL: ${PIPELINES_DEFAULT_MODEL:-}
PIPELINES_HOST_IP: ${PIPELINES_HOST_IP:-}
PIPELINES_PUBLIC_PORT: ${PIPELINES_PORT:-8080}
PIPELINES_NTFY_READER: phone-reader
PIPELINES_UID: ${PIPELINES_UID:-10001}
PIPELINES_GID: ${PIPELINES_GID:-10001}
secrets:
- ntfy_token
ports:
- "${PIPELINES_BIND_ADDRESS:-0.0.0.0}:${PIPELINES_PORT:-8080}:8080"
volumes:
- type: volume
source: pipelines-data
target: /data
volume:
nocopy: true
- type: volume
source: opencode-home
target: /home/pipelines
volume:
nocopy: true
- pipelines-workspace:/workspace
- type: bind
source: ${PIPELINES_HOST_HOME:?Run ./install.sh to configure the host repository mount}
target: ${PIPELINES_HOST_HOME:?Run ./install.sh to configure the host repository mount}
bind:
create_host_path: false
- type: bind
source: ${PIPELINES_HOST_REPOSITORY:?Run ./install.sh to configure the host repository mount}
target: ${PIPELINES_HOST_REPOSITORY:?Run ./install.sh to configure the host repository mount}
bind:
create_host_path: false
healthcheck:
test: ["CMD", "pipelines", "--url", "ws://127.0.0.1:8080/connect", "status", "--json"]
interval: 5s
timeout: 5s
retries: 12
start_period: 10s
ntfy:
image: binwiederhier/ntfy:latest
command: serve
restart: unless-stopped
environment:
TZ: ${TZ:?Set TZ to your host timezone}
NTFY_BASE_URL: ${NTFY_BASE_URL:?Set the address your Android phone can reach}
NTFY_LISTEN_HTTP: :80
NTFY_CACHE_FILE: /var/lib/ntfy/cache.db
NTFY_CACHE_DURATION: 168h
NTFY_AUTH_FILE: /var/lib/ntfy/auth.db
NTFY_AUTH_DEFAULT_ACCESS: deny-all
NTFY_ENABLE_LOGIN: "true"
NTFY_ATTACHMENT_CACHE_DIR: /var/lib/ntfy/attachments
NTFY_ATTACHMENT_EXPIRY_DURATION: 168h
NTFY_ATTACHMENT_TOTAL_SIZE_LIMIT: 1G
NTFY_ATTACHMENT_FILE_SIZE_LIMIT: 1M
ports:
- "${NTFY_BIND_ADDRESS:-0.0.0.0}:8090:80"
volumes:
- ntfy-data:/var/lib/ntfy
healthcheck:
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1/v1/health"]
interval: 5s
timeout: 3s
retries: 12
secrets:
ntfy_token:
file: ./secrets/ntfy-token.txt
volumes:
pipelines-data:
opencode-home:
pipelines-workspace:
ntfy-data: