Compare commits

...

1 Commits

Author SHA1 Message Date
079a7e2cb5 fix: creates custom images for each container 2025-05-20 23:36:55 -05:00
7 changed files with 39 additions and 29 deletions

5
.env
View File

@@ -36,3 +36,8 @@ MERCURE_JWT_SECRET="!ChangeThisMercureHubJWTSecretKey!"
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages # MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
###< symfony/messenger ### ###< symfony/messenger ###
REDIS_HOST=redis://redis
MOVIES_PATH=/var/download/movies
TVSHOWS_PATH=/var/download/tvshows

View File

@@ -13,11 +13,9 @@ services:
- $PWD/bash/certs:/etc/ssl - $PWD/bash/certs:/etc/ssl
web: web:
image: code.caldwell.digital/home/torsearch/web:latest build:
ports: dockerfile: docker/Dockerfile.web
- '8080:80' context: .
volumes:
- $PWD/bash/nginx.conf:/etc/nginx/conf.d/default.conf
depends_on: depends_on:
app: app:
condition: service_healthy condition: service_healthy
@@ -38,11 +36,16 @@ services:
condition: service_healthy condition: service_healthy
worker: worker:
image: code.caldwell.digital/home/torsearch:0.14.5-worker build:
dockerfile: docker/Dockerfile.worker
context: .
volumes: volumes:
- ./:/var/www - ./:/app
- ./var/download:/var/download - ./var/downloads/movies:/var/download/movies
command: php ./bin/console messenger:consume async -vvv --time-limit=3600 - ./var/downloads/tvshows:/var/download/tvshows
command: -v --time-limit=3600 --limit=10
env_file:
- .env
depends_on: depends_on:
app: app:
condition: service_healthy condition: service_healthy

View File

@@ -7,7 +7,7 @@ parameters:
# Media # Media
media.default_movies_dir: movies media.default_movies_dir: movies
media.default_tvshows_dir: tvshows media.default_tvshows_dir: tvshows
media.movies_path: '/var/download/%env(default:media.default_movies_dir:MOVIES_PATH)%' media.movies_path: '%env(default:media.default_movies_dir:MOVIES_PATH)%'
media.tvshows_path: '/var/download/%env(default:media.default_tvshows_dir:TVSHOWS_PATH)%' media.tvshows_path: '/var/download/%env(default:media.default_tvshows_dir:TVSHOWS_PATH)%'
# Mercure # Mercure

View File

@@ -10,12 +10,12 @@ services:
condition: service_healthy condition: service_healthy
app: app:
image: registry.caldwell.digital/home/torsearch/app:${TAG} image: code.caldwell.digital/home/torsearch/app:${TAG}
deploy: deploy:
replicas: 2 replicas: 2
worker: worker:
image: registry.caldwell.digital/home/torsearch/app:${TAG} image: code.caldwell.digital/home/torsearch/app:${TAG}
volumes: volumes:
- /mnt/media/downloads:/var/download - /mnt/media/downloads:/var/download
command: php ./bin/console messenger:consume async -v --time-limit=3600 --limit=10 command: php ./bin/console messenger:consume async -v --time-limit=3600 --limit=10
@@ -23,7 +23,7 @@ services:
replicas: 2 replicas: 2
scheduler: scheduler:
image: registry.caldwell.digital/home/torsearch/app:${TAG} image: code.caldwell.digital/home/torsearch/app:${TAG}
volumes: volumes:
- /mnt/media/downloads:/var/download - /mnt/media/downloads:/var/download
command: php ./bin/console messenger:consume scheduler_monitor -vv --time-limit=3600 command: php ./bin/console messenger:consume scheduler_monitor -vv --time-limit=3600

View File

@@ -0,0 +1,7 @@
FROM php:8.4-cli-alpine3.21
RUN docker-php-ext-install pdo_mysql
COPY --chown=www-data:www-data . /app
ENTRYPOINT [ "php", "/app/bin/console", "messenger:consume", "scheduler_monitor" ]

View File

@@ -1,12 +1,7 @@
FROM registry.caldwell.digital/library/php:8.4-apache FROM php:8.4-cli-alpine3.21
RUN apt-get update && \ RUN docker-php-ext-install pdo_mysql
apt-get install libldap2-dev -y && \
rm -rf /var/lib/apt/lists/* && \
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
docker-php-ext-install ldap
COPY --chown=www-data:www-data . /var/www COPY --chown=www-data:www-data . /app
COPY ./bash/vhost.conf /etc/apache2/sites-enabled/vhost.conf ENTRYPOINT [ "php", "/app/bin/console", "messenger:consume", "async" ]
RUN rm /etc/apache2/sites-enabled/000-default.conf

View File

@@ -14,7 +14,7 @@ services:
# This container runs the actual web app in a php:8.4-fpm # This container runs the actual web app in a php:8.4-fpm
# base container. # base container.
app: app:
image: code.caldwell.digital/home/torsearch-app:0.14.8 image: code.caldwell.digital/home/torsearch-app:0.14.9
env_file: env_file:
- .env - .env
depends_on: depends_on:
@@ -29,11 +29,11 @@ services:
# This container runs a Symfony worker process. # This container runs a Symfony worker process.
# See: https://symfony.com/doc/current/messenger.html # See: https://symfony.com/doc/current/messenger.html
worker: worker:
image: code.caldwell.digital/home/torsearch-worker:0.14.8 image: code.caldwell.digital/home/torsearch-worker:0.14.9
volumes: volumes:
- ./downloads/movies:/var/download/movies - /mnt/media/downloads/movies:/var/download/movies
- ./downloads/tvshows:/var/download/tvshows - /mnt/media/downloads/tvshows:/var/download/tvshows
command: php ./bin/console messenger:consume async -v --time-limit=3600 --limit=10 command: -v --time-limit=3600 --limit=10
env_file: env_file:
- .env - .env
depends_on: depends_on:
@@ -46,10 +46,10 @@ services:
# This container runs a Symfony worker process. # This container runs a Symfony worker process.
# See: https://symfony.com/doc/current/messenger.html # See: https://symfony.com/doc/current/messenger.html
scheduler: scheduler:
image: code.caldwell.digital/home/torsearch-worker:0.14.8 image: code.caldwell.digital/home/torsearch-scheduler:0.14.9
volumes: volumes:
- ./downloads:/var/download - ./downloads:/var/download
command: php ./bin/console messenger:consume scheduler_monitor -vv --time-limit=3600 command: -vv --time-limit=3600
env_file: env_file:
- .env - .env
depends_on: depends_on: