Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Up Cron & php7.3-intl #10

Merged
merged 7 commits into from
Nov 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
12 changes: 10 additions & 2 deletions Dockerfile.gravcore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bitnami/minideb:stretch
FROM bitnami/minideb:buster

RUN \
## Docker User
Expand All @@ -12,6 +12,7 @@ RUN \
lsb-release \
nginx \
unzip \
cron \
wget && \
## Install PHP APT Repository
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
Expand All @@ -24,12 +25,19 @@ RUN \
php7.3-curl \
php7.3-zip \
php7.3-mbstring \
php7.3-xml && \
php7.3-xml \
### ADD Multilang support for twig tools
php7.3-intl && \
## Download GRAV
mkdir -p \
/grav && \
GRAV_VERSION=$(curl -sX GET "https://api.github.com/repos/getgrav/grav/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -o /grav/grav.zip -L https://github.com/getgrav/grav/releases/download/${GRAV_VERSION}/grav-v${GRAV_VERSION}.zip && \
## Cron Setting UP
### Fix no crontab for xyz
touch /var/spool/cron/crontabs/xyz && \
### Add Cron JOB for xyz
(crontab -l; echo "* * * * * xyz cd /var/www/grav;/usr/local/bin/php bin/grav scheduler 1>> /dev/null 2>&1") | crontab -u xyz - && \
## Nginx Logs
ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log
Expand Down
14 changes: 11 additions & 3 deletions Dockerfile.gravcoreadmin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bitnami/minideb:stretch
FROM bitnami/minideb:buster

RUN \
## Docker User
Expand All @@ -12,6 +12,7 @@ RUN \
lsb-release \
nginx \
unzip \
cron \
wget && \
## Install PHP APT Repository
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
Expand All @@ -23,13 +24,20 @@ RUN \
php7.3-gd \
php7.3-curl \
php7.3-zip \
php7.3-mbstring \
php7.3-xml && \
php7.3-intl \
php7.3-xml \
### ADD Multilang support for twig tools
php7.3-intl && \
## Download GRAV
mkdir -p \
/grav && \
GRAV_VERSION=$(curl -sX GET "https://api.github.com/repos/getgrav/grav/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -o /grav/grav.zip -L https://github.com/getgrav/grav/releases/download/${GRAV_VERSION}/grav-admin-v${GRAV_VERSION}.zip && \
## Cron Setting UP
### Fix no crontab for xyz
touch /var/spool/cron/crontabs/xyz && \
### Add Cron JOB for xyz
(crontab -l; echo "* * * * * xyz cd /var/www/grav;/usr/local/bin/php bin/grav scheduler 1>> /dev/null 2>&1") | crontab -u xyz - && \
## Nginx Logs
ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log
Expand Down
14 changes: 14 additions & 0 deletions root/etc/nginx/sites-available/default
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,18 @@ server {
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
## End - PHP
##Enable Caching for tools that analyze speed performance (like gtmetrix)
### Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}

### CSS and Javascript
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "public";
}
}
4 changes: 4 additions & 0 deletions root/init-admin
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ umask 0002

service php7.3-fpm start
service nginx start
## start cron
service cron start
## trap SIGINT and SIGTERM signals and gracefully exit
trap "service cron stop; kill \$!; exit" SIGINT SIGTERM
tail -f /dev/null
4 changes: 4 additions & 0 deletions root/init-core
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ umask 0002

service php7.3-fpm start
service nginx start
## start cron
dsavell marked this conversation as resolved.
Show resolved Hide resolved
service cron start
## trap SIGINT and SIGTERM signals and gracefully exit
trap "service cron stop; kill \$!; exit" SIGINT SIGTERM
tail -f /dev/null