Last active
December 20, 2015 23:19
-
-
Save mlebkowski/6212024 to your computer and use it in GitHub Desktop.
This file contains 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
server { | |
listen 80; | |
server_name local.*; | |
root /home/docplanner/web; | |
access_log /dev/fd/1; | |
error_log /dev/fd/2 error; | |
index app_dev.php; | |
try_files $uri @rewrite; | |
location @rewrite { | |
rewrite ^/(.*)$ /app_dev.php/$1; | |
} | |
location ~ \.php { | |
fastcgi_index app_dev.php; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
include fastcgi_params; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
# This is to properly handle locale guessing from domain | |
# Without this the server name is "local.*" even if You access | |
# http://local.znanylekarz.pl/. Now it's the same as the domain | |
fastcgi_param SERVER_NAME $host; | |
} | |
} |
This file contains 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
FROM base | |
MAINTAINER [email protected] | |
RUN echo "deb http://archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get install -y wget nano python-software-properties software-properties-common | |
RUN add-apt-repository -y ppa:nginx/stable | |
RUN add-apt-repository -y ppa:ondrej/php5 | |
RUN apt-get update | |
# something about upstart in a vm box: | |
RUN dpkg-divert --local --rename --add /sbin/initctl && ln -s /bin/true /sbin/initctl | |
RUN apt-get install -y nginx | |
RUN apt-get install --force-yes -y php5-fpm php5-cli php5-mysql php-apc php5-sqlite php5-imagick php5-imap php5-intl php5-memcached php5-mcrypt php5-xdebug | |
RUN apt-get install --force-yes -y php5-dev | |
RUN pecl install mongo | |
# php5-curl php5-gd php5-mongo | |
RUN wget -O /etc/nginx/sites-available/default https://gist.github.com/mlebkowski/6212024/raw/25caa014dd42db0a3857893355dc2c2393248ce0/nginx.conf | |
RUN echo "date.timezone = Europe/Warsaw" >> /etc/php5/fpm/php.ini | |
RUN echo "daemon off;" >> /etc/nginx/nginx.conf | |
CMD php5-fpm && nginx | |
EXPOSE 80 | |
ENV SYMFONY_ENV dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment