]> git.nbdom.net Git - nb.git/commitdiff
Docker
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 19 Nov 2016 12:10:33 +0000 (12:10 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 19 Nov 2016 12:10:33 +0000 (12:10 +0000)
src/Docker/Compose/dbq/docker-compose.yaml [new file with mode: 0644]
src/Docker/nginx/Dockerfile [new file with mode: 0644]
src/Docker/nginx/default.conf [new file with mode: 0644]
src/Docker/php/Dockerfile [new file with mode: 0644]

diff --git a/src/Docker/Compose/dbq/docker-compose.yaml b/src/Docker/Compose/dbq/docker-compose.yaml
new file mode 100644 (file)
index 0000000..e271289
--- /dev/null
@@ -0,0 +1,13 @@
+php:
+  build: ../../php/
+  volumes:
+    - ./../../../:/opt/nb
+  expose:
+    - 9000
+
+nginx:
+  build: ../../nginx/
+  ports:
+    - 80:80
+  links:
+    - php
diff --git a/src/Docker/nginx/Dockerfile b/src/Docker/nginx/Dockerfile
new file mode 100644 (file)
index 0000000..e085cd6
--- /dev/null
@@ -0,0 +1,2 @@
+FROM nginx:latest
+COPY ./default.conf /etc/nginx/conf.d/default.conf
diff --git a/src/Docker/nginx/default.conf b/src/Docker/nginx/default.conf
new file mode 100644 (file)
index 0000000..930ae06
--- /dev/null
@@ -0,0 +1,36 @@
+server {
+    listen 80 default_server;
+    root /var/www/html;
+    index index.html index.php;
+
+    charset utf-8;
+
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+    }
+
+    location = /favicon.ico { access_log off; log_not_found off; }
+    location = /robots.txt  { access_log off; log_not_found off; }
+
+    access_log off;
+    error_log  /var/log/nginx/error.log error;
+
+    sendfile off;
+
+    client_max_body_size 100m;
+
+    location ~ \.php$ {
+        fastcgi_split_path_info ^(.+\.php)(/.+)$;
+        fastcgi_pass php:9000;
+        fastcgi_index index.php;
+        include fastcgi_params;
+        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+        fastcgi_intercept_errors off;
+        fastcgi_buffer_size 16k;
+        fastcgi_buffers 4 16k;
+    }
+
+    location ~ /\.ht {
+        deny all;
+    }
+}
diff --git a/src/Docker/php/Dockerfile b/src/Docker/php/Dockerfile
new file mode 100644 (file)
index 0000000..cafc940
--- /dev/null
@@ -0,0 +1,10 @@
+FROM php:7.0-fpm-alpine
+
+# Install Postgre PDO
+#RUN export DEBIAN_FRONTEND=noninteractive && apt-get -q=2 update && apt-get -q=2 -y install libpq-dev
+#RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql
+RUN set -ex && apk --no-cache add postgresql-dev
+RUN docker-php-ext-install pdo pdo_mysql pdo_sqlite pdo_sqlite pdo_pgsql pgsql
+
+EXPOSE 9000
+CMD ["/usr/bin/php", "-a"]