ineat / docker-php-nginx-postgres-composer Goto Github PK
View Code? Open in Web Editor NEWDocker Compose configuration to run PHP7.1 with Nginx, PHP-FPM, PostgreSQL 10.1 and Composer.
License: MIT License
Docker Compose configuration to run PHP7.1 with Nginx, PHP-FPM, PostgreSQL 10.1 and Composer.
License: MIT License
everything is stock per your composer yaml file, in my test script I have
<?php
$connection = pg_connect ("host=localhost dbname=dbname user=dbuser password=dbpwd port=5432");
if($connection) {
echo 'connected';
} else {
echo 'there has been an error connecting';
}
?>
however when i do host=172.21.0.4
it connects fine. Care to elaborate on what's going on? Thanks for your help!
Do you need update the php version
Hi as much as I like your layout, I suspect it can not work properly if some of the dependencies declared in the composer.json require php extensions.
I can install those php extensions in the php container, but the compose script is run by a php binary in the composer container which does not know about extensions installed in php container ...
Do you think this can be patched somehow ?
Setting up libxpm-dev:amd64 (1:3.5.12-1) ...
Processing triggers for libc-bin (2.28-10) ...
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
pecl/xdebug requires PHP (version >= 7.2.0, version <= 8.0.99), installed version is 7.1.33
No valid packages found
install failed
The command '/bin/sh -c apt-get update && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng-dev libicu-dev libpq-dev libxpm-dev libvpx-dev && pecl install xdebug && docker-php-ext-enable xdebug && docker-php-ext-install -j$(nproc) mcrypt && docker-php-ext-install -j$(nproc) gd && docker-php-ext-install -j$(nproc) intl && docker-php-ext-install -j$(nproc) zip && docker-php-ext-install -j$(nproc) pgsql && docker-php-ext-install -j$(nproc) pdo_pgsql && docker-php-ext-install -j$(nproc) exif && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-xpm-dir=/usr/lib/x86_64-linux-gnu/ --with-vpx-dir=/usr/lib/x86_64-linux-gnu/' returned a non-zero code: 1
ERROR: Service 'php' failed to build
Hi there!
I have cloned the project, entered the "docker-compose up" command.
After finishing the process, there is such log:
Creating ineat_php_1 ... done
Creating ineat_composer_1 ... done
Creating ineat_db_1 ... done
Creating ineat_web_1 ... done
Attaching to ineat_php_1, ineat_composer_1, ineat_db_1, ineat_web_1
composer_1 | Composer could not find a composer.json file in /app
composer_1 | To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
ineat_composer_1 exited with code 1
php_1 | [26-Mar-2020 18:21:02] NOTICE: fpm is running, pid 1
php_1 | [26-Mar-2020 18:21:02] NOTICE: ready to handle connections
db_1 | The files belonging to this database system will be owned by user
and a bit more of logs
So the thing is that composer throws this "could not find a composer.json file" error. Is it okay?
Tried this project on 2 different ubuntu PC's. Same thing on each one of them.
During the preparation there were some red lines with errors like:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.