Created
March 24, 2017 07:46
-
-
Save henninghorn/f5213bdbe763b3160b860f4f0e21d022 to your computer and use it in GitHub Desktop.
Docker problemer
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
FROM php:7.1-fpm | |
RUN apt-get update && apt-get install -y libmcrypt-dev mysql-client \ | |
&& docker-php-ext-install mcrypt pdo_mysql | |
WORKDIR /var/www |
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
version: '2' | |
services: | |
web: | |
build: | |
context: ./ | |
dockerfile: web.docker | |
volumes: | |
- ./:/var/www | |
ports: | |
- "8080:80" | |
links: | |
- app | |
app: | |
build: | |
context: ./ | |
dockerfile: app.docker | |
volumes: | |
- ./:/var/www | |
links: | |
- database | |
environment: | |
- "DB_PORT=3306" | |
- "DB_HOST=database" | |
database: | |
image: mysql:5.7 | |
environment: | |
- "MYSQL_ROOT_PASSWORD=secret" | |
- "MYSQL_DATABASE=dockerApp" | |
ports: | |
- "33061:3306" |
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
server { | |
listen 80; | |
index index.php index.html; | |
root /var/www/public; | |
location / { | |
try_files $uri /index.php?$args; | |
} | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass app:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
} | |
} |
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
FROM nginx:1.10 | |
ADD ./vhost.conf /etc/nginx/conf.d/default.conf | |
WORKDIR /var/www |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment