Compare commits
7 Commits
adb79db8f5
...
v0.35.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d90b4d7863 | ||
|
|
2860d2e949 | ||
|
|
ad2bbfd48c | ||
|
|
5e306c6740 | ||
|
|
56129de3f9 | ||
|
|
22b2b46da5 | ||
|
|
7cc48ffc73 |
@@ -12,3 +12,4 @@ phpstan.dist.neon
|
|||||||
phpunit.dist.xml
|
phpunit.dist.xml
|
||||||
nomad.deploy.hcl
|
nomad.deploy.hcl
|
||||||
deployment.properties
|
deployment.properties
|
||||||
|
var/download/*
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
# torsearch-app is built from this base
|
# torsearch-app is built from this base
|
||||||
export APP_FRANKENPHP_TAG=php8.4
|
export APP_FRANKENPHP_TAG=php8.4
|
||||||
|
|
||||||
docker buildx build --platform=linux/amd64,linux/arm64 -f docker/Dockerfile.base.app -t code.caldwell.digital/home/torsearch-base:${APP_FRANKENPHP_TAG} -t code.caldwell.digital/home/torsearch-base:latest --build-arg "FRANKENPHP_TAG=${APP_FRANKENPHP_TAG}" .
|
#docker buildx build --platform=linux/amd64,linux/arm64 -f docker/Dockerfile.base.app -t code.caldwell.digital/home/torsearch-base:${APP_FRANKENPHP_TAG} -t code.caldwell.digital/home/torsearch-base:latest --build-arg "FRANKENPHP_TAG=${APP_FRANKENPHP_TAG}" .
|
||||||
|
docker build -f docker/Dockerfile.base.app -t code.caldwell.digital/home/torsearch-base:${APP_FRANKENPHP_TAG} -t code.caldwell.digital/home/torsearch-base:latest --build-arg "FRANKENPHP_TAG=${APP_FRANKENPHP_TAG}" .
|
||||||
docker push code.caldwell.digital/home/torsearch-base:${APP_FRANKENPHP_TAG}
|
docker push code.caldwell.digital/home/torsearch-base:${APP_FRANKENPHP_TAG}
|
||||||
docker push code.caldwell.digital/home/torsearch-base:latest
|
docker push code.caldwell.digital/home/torsearch-base:latest
|
||||||
|
|
||||||
# torsearch-worker & torsearch-scheduler are built from this base
|
# torsearch-worker & torsearch-scheduler are built from this base
|
||||||
export WORKER_FRANKENPHP_TAG=php8.4-alpine
|
export WORKER_FRANKENPHP_TAG=php8.4-alpine
|
||||||
|
|
||||||
docker buildx build --platform=linux/amd64,linux/arm64 -f docker/Dockerfile.base.worker -t code.caldwell.digital/home/torsearch-base-worker:${WORKER_FRANKENPHP_TAG} -t code.caldwell.digital/home/torsearch-base-worker:latest --build-arg "FRANKENPHP_TAG=${WORKER_FRANKENPHP_TAG}" .
|
#docker buildx build --platform=linux/amd64,linux/arm64 -f docker/Dockerfile.base.worker -t code.caldwell.digital/home/torsearch-base-worker:${WORKER_FRANKENPHP_TAG} -t code.caldwell.digital/home/torsearch-base-worker:latest --build-arg "FRANKENPHP_TAG=${WORKER_FRANKENPHP_TAG}" .
|
||||||
|
docker build -f docker/Dockerfile.base.worker -t code.caldwell.digital/home/torsearch-base-worker:${WORKER_FRANKENPHP_TAG} -t code.caldwell.digital/home/torsearch-base-worker:latest --build-arg "FRANKENPHP_TAG=${WORKER_FRANKENPHP_TAG}" .
|
||||||
docker push code.caldwell.digital/home/torsearch-base-worker:${WORKER_FRANKENPHP_TAG}
|
docker push code.caldwell.digital/home/torsearch-base-worker:${WORKER_FRANKENPHP_TAG}
|
||||||
docker push code.caldwell.digital/home/torsearch-base-worker:latest
|
docker push code.caldwell.digital/home/torsearch-base-worker:latest
|
||||||
|
|
||||||
# torsearch-worker-supervisord
|
# torsearch-worker-supervisord
|
||||||
export ALPINE_VERSION=3.22
|
export ALPINE_VERSION=3.22
|
||||||
|
|
||||||
docker buildx build --platform=linux/amd64,linux/arm64 -f docker/Dockerfile.base.worker -t code.caldwell.digital/home/torsearch-base-worker-supervisord:latest --build-arg "ALPINE_VERSION=${ALPINE_VERSION}" .
|
#docker buildx build --platform=linux/amd64,linux/arm64 -f docker/Dockerfile.base.worker -t code.caldwell.digital/home/torsearch-base-worker-supervisord:latest --build-arg "ALPINE_VERSION=${ALPINE_VERSION}" .
|
||||||
|
docker build -f docker/Dockerfile.base.worker -t code.caldwell.digital/home/torsearch-base-worker-supervisord:latest --build-arg "ALPINE_VERSION=${ALPINE_VERSION}" .
|
||||||
docker push code.caldwell.digital/home/torsearch-base-worker-supervisord:latest
|
docker push code.caldwell.digital/home/torsearch-base-worker-supervisord:latest
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ services:
|
|||||||
build:
|
build:
|
||||||
dockerfile: docker/Dockerfile.worker
|
dockerfile: docker/Dockerfile.worker
|
||||||
context: .
|
context: .
|
||||||
args:
|
|
||||||
APP_VERSION: latest
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- $PWD:/app
|
- $PWD:/app
|
||||||
@@ -45,14 +43,11 @@ services:
|
|||||||
tty: true
|
tty: true
|
||||||
environment:
|
environment:
|
||||||
TZ: America/Chicago
|
TZ: America/Chicago
|
||||||
command: --download 2 --async
|
|
||||||
|
|
||||||
scheduler:
|
scheduler:
|
||||||
build:
|
build:
|
||||||
dockerfile: docker/Dockerfile.worker
|
dockerfile: docker/Dockerfile.scheduler
|
||||||
context: .
|
context: .
|
||||||
args:
|
|
||||||
APP_VERSION: latest
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- $PWD:/app
|
- $PWD:/app
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ services:
|
|||||||
- /mnt/media/downloads/tvshows:/var/download/tvshows
|
- /mnt/media/downloads/tvshows:/var/download/tvshows
|
||||||
- mercure_data:/data
|
- mercure_data:/data
|
||||||
- mercure_config:/config
|
- mercure_config:/config
|
||||||
depends_on:
|
|
||||||
- database
|
|
||||||
|
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
@@ -22,36 +20,21 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /mnt/media/downloads/movies:/var/download/movies
|
- /mnt/media/downloads/movies:/var/download/movies
|
||||||
- /mnt/media/downloads/tvshows:/var/download/tvshows
|
- /mnt/media/downloads/tvshows:/var/download/tvshows
|
||||||
restart: always
|
|
||||||
# command: -vv --time-limit=3600 --limit=10
|
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 2
|
replicas: 2
|
||||||
depends_on:
|
depends_on:
|
||||||
- app
|
- app
|
||||||
|
|
||||||
#
|
|
||||||
# scheduler:
|
|
||||||
# image: registry.caldwell.digital/home/torsearch-scheduler:${TAG}
|
|
||||||
# volumes:
|
|
||||||
# - /mnt/media/downloads/movies:/var/download/movies
|
|
||||||
# - /mnt/media/downloads/tvshows:/var/download/tvshows
|
|
||||||
# restart: always
|
|
||||||
# command: -vv
|
|
||||||
# depends_on:
|
|
||||||
# - app
|
|
||||||
|
|
||||||
|
scheduler:
|
||||||
redis:
|
image: registry.caldwell.digital/home/torsearch-scheduler:${TAG}
|
||||||
image: redis:latest
|
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- /mnt/media/downloads/movies:/var/download/movies
|
||||||
command: redis-server --maxmemory 512MB
|
- /mnt/media/downloads/tvshows:/var/download/tvshows
|
||||||
restart: unless-stopped
|
depends_on:
|
||||||
|
- app
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysql:
|
|
||||||
mercure_config:
|
mercure_config:
|
||||||
mercure_data:
|
mercure_data:
|
||||||
redis_data:
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,14 +10,18 @@ FROM alpine:${ALPINE_VERSION} AS build_stage
|
|||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
curl \
|
curl \
|
||||||
php84 \
|
php84 \
|
||||||
|
php84-ctype \
|
||||||
php84-curl \
|
php84-curl \
|
||||||
|
php84-dom \
|
||||||
php84-fileinfo \
|
php84-fileinfo \
|
||||||
|
php84-fpm \
|
||||||
php84-gd \
|
php84-gd \
|
||||||
php84-mbstring \
|
php84-mbstring \
|
||||||
php84-mysqli \
|
php84-mysqli \
|
||||||
php84-opcache \
|
php84-opcache \
|
||||||
php84-openssl \
|
php84-openssl \
|
||||||
php84-pdo_mysql \
|
php84-pdo_mysql \
|
||||||
|
php84-tokenizer \
|
||||||
supervisor
|
supervisor
|
||||||
|
|
||||||
RUN ln -s /usr/bin/php84 /usr/bin/php
|
RUN ln -s /usr/bin/php84 /usr/bin/php
|
||||||
@@ -27,3 +31,9 @@ RUN mkdir -p /etc/supervisor/conf.d
|
|||||||
# We start supervisord and supervisord starts
|
# We start supervisord and supervisord starts
|
||||||
# respective service in the configuration file.
|
# respective service in the configuration file.
|
||||||
ENTRYPOINT ["/app/bin/console", "init:worker"]
|
ENTRYPOINT ["/app/bin/console", "init:worker"]
|
||||||
|
|
||||||
|
# Message transports can be enabled by passing them as command options.
|
||||||
|
# Inlcluding a number with the option will start that amount of processes
|
||||||
|
# for the transport. Not supplying a number will default to 1.
|
||||||
|
# --download --monitor OR --download 2 --monitor
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,21 @@
|
|||||||
FROM code.caldwell.digital/home/torsearch-base-worker:php8.4-alpine
|
###
|
||||||
|
# This version of Torsearch can run the scheduler, downloader, and
|
||||||
|
# worker in one container. Each process is managerd by supervisord
|
||||||
|
# and can be configured via environment variables, and more than
|
||||||
|
# one of these containers can still be run.
|
||||||
|
###
|
||||||
|
|
||||||
ARG APP_VERSION="0.0.0-dev"
|
# Default to latest, but should pass in a version
|
||||||
ENV APP_VERSION="${APP_VERSION}"
|
ARG APP_VERSION="latest"
|
||||||
|
|
||||||
COPY . /app
|
# Start with our base worker image
|
||||||
|
FROM code.caldwell.digital/home/torsearch-base-worker-supervisord:latest
|
||||||
|
|
||||||
ENTRYPOINT [ "php", "/app/bin/console", "messenger:consume", "scheduler_monitor" ]
|
# Set the APP_VERSION in the image
|
||||||
|
ENV APP_VERSION=${APP_VERSION}
|
||||||
|
|
||||||
HEALTHCHECK --interval=3s --timeout=3s --retries=10 CMD return 0
|
# Copy the actual application code from the previously built app
|
||||||
|
COPY --chown=1000:1000 ./ /app
|
||||||
|
|
||||||
|
# To retain backwards compatibility, default to async & download transports
|
||||||
|
CMD [ "--monitor" ]
|
||||||
|
|||||||
@@ -1,26 +1,24 @@
|
|||||||
###
|
###
|
||||||
# This version of Torsearch runs the scheduler, downloader, and worker
|
# This version of Torsearch can run the scheduler, downloader, and
|
||||||
# in this one container. Each process is managerd by supervisord
|
# worker in one container. Each process is managerd by supervisord
|
||||||
# and can be configured via environment variables and more
|
# and can be configured via environment variables, and more than
|
||||||
# than one of these containers cans till be run.
|
# one of these containers can still be run.
|
||||||
###
|
###
|
||||||
|
|
||||||
|
# Default to latest, but should pass in a version
|
||||||
ARG APP_VERSION="latest"
|
ARG APP_VERSION="latest"
|
||||||
|
|
||||||
FROM code.caldwell.digital/home/torsearch-app:${APP_VERSION} AS base_image
|
# Set aside the actual app image so we can copy the app from there
|
||||||
|
FROM code.caldwell.digital/home/torsearch-app:${APP_VERSION} AS app_image
|
||||||
|
|
||||||
|
# Start with our base worker image
|
||||||
FROM code.caldwell.digital/home/torsearch-base-worker-supervisord:latest
|
FROM code.caldwell.digital/home/torsearch-base-worker-supervisord:latest
|
||||||
|
|
||||||
|
# Set the APP_VERSION in the image
|
||||||
ENV APP_VERSION=${APP_VERSION}
|
ENV APP_VERSION=${APP_VERSION}
|
||||||
|
|
||||||
COPY --from=base_image --chown=1000:1000 /app /app
|
# Copy the actual application code from the previously built app
|
||||||
COPY docker/ /app/docker
|
COPY --chown=1000:1000 --from=app_image /app /app
|
||||||
|
|
||||||
# We start supervisord and supervisord starts
|
# To retain backwards compatibility, default to async & download transports
|
||||||
# respective service in the configuration file.
|
CMD [ "--async", "--download" ]
|
||||||
ENTRYPOINT ["/app/bin/console", "init:worker"]
|
|
||||||
|
|
||||||
# Message transports can be enabled by passing them as command options.
|
|
||||||
# Inlcluding a number with the option will start that amount of processes
|
|
||||||
# for the transport. Not supplying a number will default to 1.
|
|
||||||
# --download --monitor OR --download 2 --monitor
|
|
||||||
|
|||||||
Reference in New Issue
Block a user