From c9b64b23378fb6bcd69db4c15f885c16bbc27af3 Mon Sep 17 00:00:00 2001 From: CaliBrain Date: Thu, 19 Dec 2024 16:57:56 -0500 Subject: [PATCH] Fix compose port (#13) --- docker-compose.dev.yml | 29 +++++++++++++++++++++++++++++ docker-compose.yml | 6 +++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 docker-compose.dev.yml diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 00000000..53ef7efb --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,29 @@ +# If you change the FLASK_PORT, do not forget to change it in ports and healthcheck as well. +services: + calibre-web-automated-book-downloader: + build : + context: . + dockerfile: Dockerfile + environment: + FLASK_PORT: 8084 + FLASK_DEBUG: false + CLOUDFLARE_PROXY_URL: http://cloudflarebypassforscraping:8000 + INGEST_DIR: /cwa-book-ingest + BOOK_LANGUAGE: en + ports: + - 8084:8084 + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8084/request/api/status"] + interval: 30s + timeout: 30s + retries: 3 + start_period: 5s + restart: unless-stopped + volumes: + # This is where the books will be downloaded to, usually it would be + # the same as whatever you gave in "calibre-web-automated" + - /tmp/data/calibre-web/ingest:${INGEST_DIR:-/cwa-book-ingest} + + cloudflarebypassforscraping: + image: ghcr.io/sarperavci/cloudflarebypassforscraping:latest + restart: unless-stopped diff --git a/docker-compose.yml b/docker-compose.yml index fdea0bcd..c1179acc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,4 @@ +# If you change the FLASK_PORT, do not forget to change it in ports and healthcheck as well. services: calibre-web-automated-book-downloader: image: ghcr.io/calibrain/calibre-web-automated-book-downloader:latest @@ -8,9 +9,9 @@ services: INGEST_DIR: /cwa-book-ingest BOOK_LANGUAGE: en ports: - - "${FLASK_PORT:-8084}:${FLASK_PORT:-8084}" + - 8084:8084 healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:${FLASK_PORT:-8084}/request/api/status"] + test: ["CMD", "curl", "-f", "http://localhost:8084/request/api/status"] interval: 30s timeout: 30s retries: 3 @@ -24,4 +25,3 @@ services: cloudflarebypassforscraping: image: ghcr.io/sarperavci/cloudflarebypassforscraping:latest restart: unless-stopped - \ No newline at end of file