Skip to content

Instantly share code, notes, and snippets.

@k0pernikus
Last active May 30, 2016 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k0pernikus/64d655160ccc326d30070bd8edf5d954 to your computer and use it in GitHub Desktop.
Save k0pernikus/64d655160ccc326d30070bd8edf5d954 to your computer and use it in GitHub Desktop.
Setup phalcon app via docker-compose using base php:5.6-apache image
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^((?s).*)$ index.php?_url=/$1 [QSA,L]
</IfModule>
phlaconapp:
hostname: phaclonapp
dockerfile: Dockerfile
build: ./
ports:
- "1080:80"
- "1043:433"
environment:
TERM: xterm-color
ENVIRONMENT: dev
volumes:
- ./:/var/www/html/
FROM php:5.6-apache
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php -r "if (hash_file('SHA384', 'composer-setup.php') === '070854512ef404f16bac87071a6db9fd9721da1684cd4589b1196c3faf71b9a2682e2311b36a5079825e155ac7ce150d') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
php composer-setup.php && \
php -r "unlink('composer-setup.php');"
RUN apt-get update && apt-get install vim git php-mysql -y && \
cd / && \
git clone --depth=1 git://github.com/phalcon/cphalcon.git && \
cd cphalcon/build && \
./install
RUN echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/phalcon.ini
RUN a2enmod rewrite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment