Public Repository

Last pushed: a year ago
Short Description
Bitbucket pipeline image for Symfony 2/3. Based on Ubuntu with Apache, PHP, Postgres, Redis...
Full Description

bitbucket-pipeline-php-postgres-redis

Created for Symfony 2/3, but can use with any PHP-Frameworks

Installed

  • Apache
  • PHP 7.0 (php-xml, php-zip, php-xmlreader, php-opcache, php-mcrypt, php-curl, php-json, php-dom, php-phar, php-mbstring, php-bcmath, php-pdo, php-soap, php-xdebu, php-pgsql, libapache2-mod-php )
  • PostgreSQL 9.3
  • Git
  • Redis
  • Composer, curl, wget

PostgreSQL default

Database: docker
User: docker
Password: docker

Sample of bitbucket-pipelines.yml

image: maxlipsky/bitbucket-pipeline-php-postgres-redis

pipelines:
  default:
    - step:
        script: # Modify the commands below to build your repository.
          - ln -s /opt/atlassian/pipelines/agent/build /var/www/docker
          - ./parameters.sh # additional parameters for Symgony project, saved in the root of project
          - service apache2 start
          - service postgresql start
          - redis-server --daemonize yes
          - composer install
          - chown -R www-data:www-data var/logs
          - chown -R www-data:www-data var/cache
          - rm -rf var/logs/* var/cache/*
          - phpunit # start tests 
          - curl -L http://example.local # show site

Sample of parameters.sh (for Symfony 2/3 Framework)

Add this file to root of your project
You can define ${MAILER_TRANSPORT} etc, in the settings of Pipeline of your project on the bitbucket.org

#!/bin/bash

echo "127.0.0.1 example.local" >> /etc/hosts

cat > app/config/parameters.yml <<EOL
parameters:
    database_host: 127.0.0.1
    database_port: 5432
    database_name: docker
    database_user: docker
    database_password: docker
    mailer_transport: ${MAILER_TRANSPORT}
    mailer_host: ${MAILER_HOST}
    mailer_port: ${MAILER_PORT}
    mailer_user: ${MAILER_USER}
    mailer_password: ${MAILER_PASSWORD}
    secret: ${SECRET}
EOL

Changelog

Latest

  • Apache
  • PHP 7.0
  • PostgreSQL 9.3
  • Redis
  • Git
  • Composer, PHPUnit, curl, wget
Docker Pull Command
Owner
maxlipsky

Comments (0)