GithubHelp home page GithubHelp logo

webdevops / php-docker-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
557.0 36.0 185.0 601 KB

:stew: PHP Docker Boilerplate for Symfony, Wordpress, Joomla or any other PHP Project (NGINX, Apache HTTPd, PHP-FPM, MySQL, Solr, Elasticsearch, Redis, FTP)

Home Page: https://webdevops.io/projects/php-docker-boilerplate/

License: MIT License

Makefile 3.43% Shell 25.78% HTML 0.76% CSS 6.99% JavaScript 47.66% PHP 0.04% Dockerfile 15.33%
php docker boilerplate php-fpm apache2 nginx mysql solr ftp elasticsearch

php-docker-boilerplate's People

Contributors

andreaskweber avatar cezarpopa avatar chieftainy2k avatar dgleba avatar elmar-hinz avatar fourty2 avatar guiyomh avatar htuscher avatar ipf avatar josefglatz avatar kitzberger avatar mblaschke avatar panadeedu avatar pborreli avatar richhl avatar rizzicr avatar rotespferd avatar sterlingvix avatar tbal avatar thomaskieslich avatar ulrikkold avatar zoh48gz04 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-docker-boilerplate's Issues

Nginx Symfony3 Debian 8

Hi,
When i try to connect to app_dev.php i get this Alert !

"An error occurred while loading the web debug toolbar (404: Not Found).

Do you want to open the profiler?"
screenshot from 2016-03-29 18 16 33
and when i press OK i get this url, app_dev.php/_profiler/290fc5 with "File not found. " message.

the config that i use

  • docker-compose.development.yml
  • webdevops/php-nginx:debian-8 image

Port 80 and 443

Is there any configuration to expose the port 80 and 443?

I've tried with docker compose:

ports:
  - "80:80"
  - "443:443"

Integration of Sphinx

Hey guys,

is it planned to integrate sphinx?
It would be really fine, so it can speed up massive without any big changes of queries.

regards

Permission when deploying to Ubuntu

On the server when I deploy the app, the website always ask for writable permission on some specific folder: tmp, cache, logs of folder app

Do I need to run chmod or chown command to gain access to the docker

I am running webdevops:php-nginx-16.04

Pagespeed

Hi,

first of all, thx for your excellent work.

I want to integrate pagespeed, is there any workflow
planned to customize/extend the web servers?

regards

php blackfire is not working for ubuntu images

Because of a wrong path inside provision/roles/boilerplate-main-development/tasks/bootstrap.yml the main build fails:
"Failed to find required executable rpm"

It should be look like this:


---

- include: bootstrap/php-blackfire/debian.yml
  when: ansible_distribution == 'CentOS' and PROVISION.install.phpBlackfire is defined and PROVISION.install.phpBlackfire

- include: bootstrap/php-blackfire/debian.yml
  when: ansible_os_family == 'Debian' and PROVISION.install.phpBlackfire is defined and PROVISION.install.phpBlackfire

- include: bootstrap/php.xdebug.yml
  when: PROVISION.install.phpXdebug is defined and PROVISION.install.phpXdebug

Additional, the provisioning script "provision/roles/boilerplate-main-development/tasks/bootstrap/php-blackfire/debian.yml" only installs the blackfire-php (probe), but not the blackfire-agent (blackfire-agent and cli-tools) package.
To get blackfire working, both packages are needed and an unique server/client id and token, which can be get from the blackfire.io webpage, must be set.

As far as I see, there is currently no possibility to set this parameters in any yml file.

The whole install process is described on this page:
https://blackfire.io/docs/up-and-running/installation

There is also a complete docker setup for php blackfire available:
https://blackfire.io/docs/integrations/docker

DB data does not persist

When I bring a container down, I lose my data.
Surely this isn't expected?

Don't we need a volume for /var/lib/mysql?

add Debian-Version

Hi,

since Debian is quite a common hosting-solution, how about adding a Debian-Version ?

regards,
strowi

fastcgi_params in virtual host of nginx

Hi guys!

I'm wondering if it is possible to set fastcgi_param in virtual hosts. Currently the only file that make any change in the environment variables is the default one /etc/nginx/fastcgi_params

What I'm trying:

    location ~ \.php$ {

        fastcgi_param TESTVAR  testvar;

    }

Add http header cachebreak option

Hi,

for using the Boilerplate for development it would be helpful to add an option that adds HTTP-headers for cachebreaking (e.g. Expires, must-revalidate etc.) for any request.

How do I install WordPress?

Hello to everyone.
I want to install WordPress inside the app directory. But mySQL does not accept the information. Can you help with this?

SSL

i want to ask how is it possible to change the ssl certification files?
i need them for the apache installation

regards and thx

php-module install

hi,

is there a way to add an extra php-module for example php-imap?

regards

Mysql Backup fail

when i run make mysql-backup i have this error :

Found Makefile directory: /home/vagrant/projects/drupal8
 * Starting MySQL backup...
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
Makefile:41: recipe for target 'mysql-backup' failed
make: *** [mysql-backup] Error 2


  [CliTools\Exception\CommandExecutionException]
  Process make did not finished successfully


make

a solution to fix it, is to udpdate the bin/backup.sh to add user, host and password :

dockerExec  mysqldump -h mysql -u dev -pdev database --opt --single-transaction --events --routines --comments

or add my.cnf

How to use PostgreSQL instead of mysql ?

Hello,
Have you managed to use postgreSQL ?

I'm trying to replace mysql with postgresql, but I can't get symfony / laravel to connect.

I have the following error when trying to connect to a remote (aws) postgreSQL database :
ErrorException in Connection.php line 770:
could not find driver

In docker-compose i linked postgre
links:
#- mail
#- mysql
- pgsql

Removed comments from PostgreSQL config
#######################################

PostgreSQL server

#######################################
pgsql:
build:
context: docker/postgres/

dockerfile: Postgres-9.4.Dockerfile

  dockerfile: Postgres-9.5.Dockerfile

volumes_from:

- storage

ports:
  - 15432:5432
env_file:
  - etc/environment.yml
  - etc/environment.development.yml

It seems the php7 extension for postgreSQL is missing
I tried to install it with "RUN /usr/local/bin/apt-install php7.0-pgsql" but can't find any php packages installed :/

SSL - lets encrypt

hey,

i've tried to add an lets-encrypt ssl certificate.
but when i start the server and check the https protocol, i get net::ERR_CERT_AUTHORITY_INVALID.
now i found the problem was, that the domain i used for encrypted is different to the docker domain.

on the error message i've seen the following values:

CN = *.vm
O = Docker Boilerplate

but i change all docker configurations where i found the .vm and *.vm entries and change them to my domain name.

when i check the docker-compose logs i found the following entries by "docker-compose logs | grep *.vm"

app_1 | ok: [localhost] => (item=[{u'variable': u'ALIAS_DOMAIN', u'value': u'.vm'}, u'/opt/docker/etc/nginx/global.conf'])
app_1 | ok: [localhost] => (item=[{u'variable': u'ALIAS_DOMAIN', u'value': u'
.vm'}, u'/opt/docker/etc/nginx/main.conf'])
app_1 | ok: [localhost] => (item=[{u'variable': u'ALIAS_DOMAIN', u'value': u'.vm'}, u'/opt/docker/etc/nginx/php.conf'])
app_1 | ok: [localhost] => (item=[{u'variable': u'ALIAS_DOMAIN', u'value': u'
.vm'}, u'/opt/docker/etc/nginx/vhost.common.conf'])
app_1 | ok: [localhost] => (item=[{u'variable': u'ALIAS_DOMAIN', u'value': u'.vm'}, u'/opt/docker/etc/nginx/vhost.conf'])
app_1 | ok: [localhost] => (item=[{u'variable': u'ALIAS_DOMAIN', u'value': u'
.vm'}, u'/opt/docker/etc/nginx/vhost.ssl.conf'])
app_1 | ok: [localhost] => (item=[{u'variable': u'ALIAS_DOMAIN', u'value': u'.vm'}, u'/opt/docker/etc/nginx/global.conf'])
app_1 | ok: [localhost] => (item=[{u'variable': u'ALIAS_DOMAIN', u'value': u'
.vm'}, u'/opt/docker/etc/nginx/main.conf'])
app_1 | ok: [localhost] => (item=[{u'variable': u'ALIAS_DOMAIN', u'value': u'.vm'}, u'/opt/docker/etc/nginx/php.conf'])
app_1 | ok: [localhost] => (item=[{u'variable': u'ALIAS_DOMAIN', u'value': u'
.vm'}, u'/opt/docker/etc/nginx/vhost.common.conf'])
app_1 | ok: [localhost] => (item=[{u'variable': u'ALIAS_DOMAIN', u'value': u'.vm'}, u'/opt/docker/etc/nginx/vhost.conf'])
app_1 | ok: [localhost] => (item=[{u'variable': u'ALIAS_DOMAIN', u'value': u'
.vm'}, u'/opt/docker/etc/nginx/vhost.ssl.conf'])

have you any idea?

regards

Nginx config

Hi,

is it possible to add some additional configs to the nginx config?
we have to set:

fastcgi_buffers;
fastcgi_buffer_size;
proxy_buffer_size;
proxy_buffers;
proxy_busy_buffers_size;

regards and thx

Memcached extension failed in php

hi,

i've installed the new version 5.0.0 with the "webdevops/php-apache:debian-8-php7" template.
i activated the memcached part in the docker-compose.yml file.

but when i check if the php memcached extension is installed, i cant find any extension

regards

Connection refused from app container to postgresql

I'm getting SQLSTATE[08006] [7] could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 15432 when connecting from app container htttp://localhost:8000

My app/config/parameters.yml:

parameters:
    database_driver: pdo_pgsql
    database_host: localhost
    database_port: 15432
    *****

My docker ps output at host:

$ docker ps

CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS                                                                          NAMES

0dcfd05e6225        tfgnextentorno_app        "/opt/docker/bin/e..."   40 minutes ago      Up 11 minutes       9000/tcp, 0.0.0.0:10022->22/tcp, 0.0.0.0:8000->80/tcp, 0.0.0.0:8443->443/tcp  tfgnextentorno_app_1

9077cc959ec8        tfgnextentorno_postgres   "/docker-entrypoin..."   49 minutes ago      Up 11 minutes       0.0.0.0:15432->5432/tcp                                                        tfgnextentorno_postgres_1

230771a097d2        app_web                   "/usr/bin/supervisord"   About an hour ago   Up About an hour                                                                                   app_web_1

b066892ac462        mailhog/mailhog           "MailHog"                2 hours ago         Up 11 minutes       1025/tcp, 8025/tcp

My netstat output at host:

$> netstat -at
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State 
....
tcp6       0      0 [::]:15432              [::]:*                  LISTEN     
tcp6       0      0 [::]:57741              [::]:*                  LISTEN     
tcp6       0      0 [::]:sunrpc             [::]:*                  LISTEN     
tcp6       0      0 [::]:45904              [::]:*                  LISTEN     
tcp6       0      0 [::]:55762              [::]:*                  LISTEN     
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN     
tcp6       0      0 localhost:ipp           [::]:*                  LISTEN     
tcp6       1      0 localhost:59728         localhost:ipp           CLOSE_WAIT 

I have tried ::1, 127.0.0.1 as host address at parameters.yml but got same result. I can connect to postgresql container from the host but not able to do it from app container.

Thx in advance.

MySQL 5.7 immediatly shuts down on start

mysql_1 | 2015-10-21T10:41:46.452979Z 0 [ERROR] InnoDB: Cannot open './/ib_buffer_pool' for reading: No such file or directory
mysql_1 | 2015-10-21T10:41:46.453087Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql_1 | 2015-10-21T10:41:46.454614Z 0 [Warning] System table 'plugin' is expected to be transactional.
mysql_1 | 2015-10-21T10:41:46.454773Z 0 [ERROR] unknown variable 'innodb_additional_mem_pool_size=40M'
mysql_1 | 2015-10-21T10:41:46.454782Z 0 [ERROR] Aborting

The variable is deprecated / removed as seen on http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_additional_mem_pool_size

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.