Comments (1)
See below a kinda working version to use with Google Cloud Run, just not able to find the "backend" :
`FROM php:7.4-apache
RUN apt-get update && apt-get install -y cron git-core jq unzip vim zip
libjpeg-dev libpng-dev libpq-dev libsqlite3-dev libwebp-dev libzip-dev &&
rm -rf /var/lib/apt/lists/* &&
docker-php-ext-configure zip --with-zip &&
docker-php-ext-configure gd --with-jpeg --with-webp &&
docker-php-ext-install exif gd mysqli opcache pdo_pgsql pdo_mysql zip
RUN {
echo 'opcache.memory_consumption=128';
echo 'opcache.interned_strings_buffer=8';
echo 'opcache.max_accelerated_files=4000';
echo 'opcache.revalidate_freq=2';
echo 'opcache.fast_shutdown=1';
echo 'opcache.enable_cli=1';
} > /usr/local/etc/php/conf.d/docker-oc-opcache.ini
RUN {
echo 'log_errors=on';
echo 'display_errors=off';
echo 'upload_max_filesize=32M';
echo 'post_max_size=32M';
echo 'memory_limit=128M';
} > /usr/local/etc/php/conf.d/docker-oc-php.ini
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php -- --1 --install-dir=/usr/local/bin --filename=composer &&
/usr/local/bin/composer global require hirak/prestissimo
RUN a2enmod rewrite
COPY config/docker /usr/src/octobercms-config-docker
ENV OCTOBERCMS_TAG v1.0.473
ENV OCTOBERCMS_CHECKSUM f8667a36d1c23a761e5b7a5e2f362e44d0e754e8
ENV OCTOBERCMS_CORE_BUILD 473
ENV OCTOBERCMS_CORE_HASH 652ebd026445ccaeb3ba083f00830dc0
ENV COMPOSER_MEMORY_LIMIT=-1
ENV PORT=80
ENV CMS_LINK_POLICY=secure
RUN git clone https://github.com/octobercms/october.git -b $OCTOBERCMS_TAG --depth 1 . &&
echo "Update composer.json: Set explicit build references for october module dependencies" &&
sed -i.orig "s/("october/([rain|system|backend|cms])": "(~1.0)")/"october/\2": "<=${OCTOBERCMS_TAG#v}"/g" composer.json &&
egrep -o "['"]october/[rain|system|backend|cms]['"]\s*:\s*'"['"]" composer.json &&
composer install --no-interaction --prefer-dist --no-scripts &&
composer clearcache &&
git status && git checkout modules/. &&
rm -rf .git &&
echo 'APP_ENV=docker' > .env &&
mv /usr/src/octobercms-config-docker config/docker &&
touch storage/database.sqlite &&
chmod 666 storage/database.sqlite &&
php artisan october:up &&
php artisan plugin:install october.drivers &&
chown -R www-data:www-data /var/www/html &&
find . -type d ( -path './plugins' -or -path './storage' -or -path './themes' -or -path './plugins/' -or -path './storage/' -or -path './themes/*' ) -exec chmod g+ws {} ;
RUN php -r "use System\Models\Parameter;
require DIR.'/bootstrap/autoload.php';
$app = require_once DIR.'/bootstrap/app.php';
$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();
Parameter::set(['system::core.build'=>getenv('OCTOBERCMS_CORE_BUILD'), 'system::core.hash'=>getenv('OCTOBERCMS_CORE_HASH')]);
echo "October CMS \n Build: ",Parameter::get('system::core.build'), "\n Hash: ", Parameter::get('system::core.hash'), "\n";"
RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/october-cron &&
crontab /etc/cron.d/october-cron
RUN echo 'exec php artisan "$@"' > /usr/local/bin/artisan &&
echo 'exec php artisan tinker' > /usr/local/bin/tinker &&
echo '[
sed -i '1s;^;#!/bin/bash\n[ "$PWD" != "/var/www/html" ] && echo " - Helper must be run from /var/www/html" && exit 1\n;' /usr/local/bin/artisan /usr/local/bin/tinker /usr/local/bin/october &&
chmod +x /usr/local/bin/artisan /usr/local/bin/tinker /usr/local/bin/october
COPY docker-oc-entrypoint /usr/local/bin/
#RUN sed -i 's/80/${PORT}/g' $APACHE_CONFDIR/conf-available/docker-oc-apache.conf
EXPOSE 80
ENTRYPOINT ["docker-oc-entrypoint"]
CMD ["apache2-foreground"]
`
from docker-octobercms.
Related Issues (20)
- PHP 7.4 support HOT 1
- how to set PHP max_execution_time ? HOT 2
- Add kubernetes charts
- Update README with ssl notes HOT 2
- Problem writing to the storage directory HOT 4
- Build 465 images are not accessible HOT 1
- cron runs with different env variables HOT 4
- Theme volume assets not found in browser
- Xdebug error HOT 1
- Installing Plugin Dependencies on `docker-compose up` HOT 1
- Trying to user PHP 7.4-apache Dockerfile : Composer Error HOT 4
- [Feature Request] Upgrade to Octobercms v1.1 HOT 2
- Enable Supervisor? HOT 1
- Bad protocol version. Please update to a newer version of October CMS (Build >472 or >v1.1.5) and try again. HOT 2
- How to enable more PHP Extensions? HOT 1
- Support for OctoberCMS V2.0 HOT 1
- Actualize tags of images in Docker Hub HOT 1
- Wrong url / missing port in storage/app urls
- How to use Dockerfile for actual new version of October CMS?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-octobercms.