Dateien nach "/" hochladen
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
services:
|
||||
phpipam-outline-sync:
|
||||
image: python:3.12-slim
|
||||
container_name: phpipam-outline-sync
|
||||
restart: unless-stopped
|
||||
working_dir: /code
|
||||
command: sh -c "pip install --no-cache-dir -r requirements.txt && uvicorn app.main:app --host 0.0.0.0 --port 8000"
|
||||
volumes:
|
||||
# Hier landet der Projektordner (app/ + requirements.txt), den du im
|
||||
# nächsten Schritt auf den Server überträgst. Pfad bei Bedarf anpassen
|
||||
# oder als Portainer-Stack-Variable APP_DIR überschreiben.
|
||||
- ${APP_DIR:-/opt/stacks/phpipam-outline-sync}:/code
|
||||
# Cache, damit pip die Pakete nicht bei jedem Neustart neu herunterlädt
|
||||
- pip_cache:/root/.cache/pip
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
PHPIPAM_BASE_URL: ${PHPIPAM_BASE_URL}
|
||||
PHPIPAM_APP_ID: ${PHPIPAM_APP_ID}
|
||||
PHPIPAM_APP_TOKEN: ${PHPIPAM_APP_TOKEN:-}
|
||||
PHPIPAM_USERNAME: ${PHPIPAM_USERNAME:-}
|
||||
PHPIPAM_PASSWORD: ${PHPIPAM_PASSWORD:-}
|
||||
PHPIPAM_VERIFY_SSL: ${PHPIPAM_VERIFY_SSL:-true}
|
||||
OUTLINE_BASE_URL: ${OUTLINE_BASE_URL}
|
||||
OUTLINE_API_TOKEN: ${OUTLINE_API_TOKEN}
|
||||
OUTLINE_COLLECTION_ID: ${OUTLINE_COLLECTION_ID}
|
||||
OUTLINE_PARENT_DOCUMENT_ID: ${OUTLINE_PARENT_DOCUMENT_ID:-}
|
||||
OUTLINE_VERIFY_SSL: ${OUTLINE_VERIFY_SSL:-true}
|
||||
SYNC_DRY_RUN: ${SYNC_DRY_RUN:-false}
|
||||
SYNC_SCHEDULE_ENABLED: ${SYNC_SCHEDULE_ENABLED:-true}
|
||||
SYNC_SCHEDULE_CRON: ${SYNC_SCHEDULE_CRON:-0 * * * *}
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3)"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
start_period: 15s
|
||||
retries: 3
|
||||
|
||||
# Alternative statt Bind-Mount oben, falls du keinen direkten
|
||||
# Dateisystemzugriff auf den Docker-Host hast und Dateien stattdessen
|
||||
# über Portainers Volume-Browser hochladen willst:
|
||||
# volumes:
|
||||
# - app_code:/code
|
||||
# - pip_cache:/root/.cache/pip
|
||||
|
||||
volumes:
|
||||
pip_cache:
|
||||
# app_code: # nur nötig für die Named-Volume-Alternative oben
|
||||
Reference in New Issue
Block a user