Created
October 26, 2021 19:00
-
-
Save zorca/298aed1085cf5e6b38ae9f5c586bef43 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is a template, and might need editing before it works on your project. | |
# Select image from https://hub.docker.com/_/php/ | |
image: php:latest | |
# Select what we should cache between builds | |
cache: | |
paths: | |
- vendor/ | |
before_script: | |
# Setting up SSH | |
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' | |
- mkdir -p ~/.ssh | |
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa | |
- chmod 700 ~/.ssh/id_rsa | |
- eval "$(ssh-agent -s)" | |
- ssh-add ~/.ssh/id_rsa | |
- ssh-keyscan -H 'gitlab.com' >> ~/.ssh/known_hosts | |
# Install utilities | |
- apt-get update -yqq | |
- apt-get install -yqq git libmcrypt-dev libpq-dev libcurl4-gnutls-dev libicu-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev libzip-dev | |
# Install PHP extensions | |
- docker-php-ext-install mbstring curl json intl gd xml zip bz2 opcache | |
# Install mcrypt | |
- pecl install mcrypt | |
- docker-php-ext-enable mcrypt | |
# Install & enable Xdebug for code coverage reports | |
# - pecl install xdebug | |
# - docker-php-ext-enable xdebug | |
# Install and run Composer | |
- curl -sS https://getcomposer.org/installer | php | |
- php composer.phar install | |
deploy: | |
stage: deploy | |
only: | |
- develop | |
script: | |
- curl -LO https://deployer.org/deployer.phar | |
- mv deployer.phar /usr/local/bin/dep | |
- chmod +x /usr/local/bin/dep | |
- dep deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment