Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
5dd4195d
Commit
5dd4195d
authored
Nov 26, 2019
by
Dominik Hebeler
Browse files
Added cron to Dockerimage
parent
1fd28532
Changes
1
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
5dd4195d
...
...
@@ -2,6 +2,7 @@ FROM nginx
RUN
apt
-y
update
&&
apt
-y
install
php-fpm
\
ca-certificates
\
cron
\
zip
\
php7.3-common
\
php7.3-curl
\
...
...
@@ -23,6 +24,9 @@ RUN sed -i 's/listen.owner = www-data/listen.owner = nginx/g' /etc/php/7.3/fpm/p
# Set correct timezone
RUN
ln
-fs
/usr/share/zoneinfo/Europe/Berlin /etc/localtime
&&
dpkg-reconfigure
-f
noninteractive tzdata
# Add Cronjob for Laravel
RUN
(
crontab
-l
;
echo
"* * * * * php /html/artisan schedule:run >> /dev/null 2>&1"
)
| crontab
WORKDIR
/html
EXPOSE
80
...
...
@@ -30,4 +34,4 @@ COPY config/nginx.conf /etc/nginx/nginx.conf
COPY
config/nginx-default.conf /etc/nginx/conf.d/default.conf
COPY
. /html
CMD
/etc/init.d/php7.3-fpm start && /etc/init.d/nginx start && /etc/init.d/redis-server start && php artisan worker:spawner
CMD
/etc/init.d/cron start &&
/etc/init.d/php7.3-fpm start && /etc/init.d/nginx start && /etc/init.d/redis-server start && php artisan worker:spawner
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment