mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Merge pull request #3074 from AlexandreBrach/PHRDPL-61_thumbnails_not_shown
PHRDPL-61 #comment worker use the app user to run jobs
This commit is contained in:
@@ -88,7 +88,7 @@ COPY templates /var/alchemy/templates
|
||||
COPY tests /var/alchemy/tests
|
||||
|
||||
# Phraseanet
|
||||
FROM php:7.0-fpm-stretch as phraseanet
|
||||
FROM php:7.0-fpm-stretch as phraseanet-fpm
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
apt-transport-https \
|
||||
@@ -152,6 +152,10 @@ WORKDIR /var/alchemy/Phraseanet
|
||||
ENTRYPOINT ["/phraseanet-entrypoint.sh"]
|
||||
CMD ["/boot.sh"]
|
||||
|
||||
# phraseanet-worker
|
||||
FROM phraseanet-fpm as phraseanet-worker
|
||||
CMD ["/worker-boot.sh"]
|
||||
|
||||
# phraseanet-nginx
|
||||
FROM nginx:1.15 as phraseanet-nginx
|
||||
RUN useradd -u 1000 app
|
||||
|
@@ -68,6 +68,8 @@ The two images can be built respectively with these two commands :
|
||||
docker build --target phraseanet-nginx -t local/phraseanet-nginx .
|
||||
|
||||
# php-fpm application
|
||||
docker build --target phraseanet -t local/phraseanet .
|
||||
docker build --target phraseanet-fpm -t local/phraseanet-fpm .
|
||||
|
||||
# worker
|
||||
docker build --target phraseanet-worker -t local/phraseanet-worker .
|
||||
|
||||
|
3
docker/phraseanet/worker-boot.sh
Executable file
3
docker/phraseanet/worker-boot.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
runuser app -c 'php /var/alchemy/Phraseanet/bin/console task-manager:scheduler:run'
|
Reference in New Issue
Block a user