]> git.nbdom.net Git - nb.git/commitdiff
Bed
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 20 Nov 2016 05:30:20 +0000 (05:30 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 20 Nov 2016 05:30:20 +0000 (05:30 +0000)
etc/profile.d/docker.sh
src/Docker/Compose/dbq/docker-compose.yaml
src/Docker/Compose/dbq/index.php [new file with mode: 0644]
src/Docker/nginx/Dockerfile
src/Docker/php/Dockerfile

index edc10081372f17ae75e3b7dc9dad0c23aff3a75b..266e501568a515fea79b1fd9f7c3b4a4d6bc6524 100644 (file)
@@ -19,7 +19,9 @@ if [ -z "$MYVIMRC" ]; then
 fi
 
 if which docker-compose > /dev/null; then
-  true
+docker_compose_force() {
+  docker-compose up --force-recreate --build --remove-orphans -d $@
+}
 fi
 
 docker_build() {
index 07f9798bab81da797f71b6808d7e67ecbc20e07e..3ee145454283503c3a9253a72f51370b011df6bb 100644 (file)
@@ -3,13 +3,18 @@ php:
   volumes:
     #- ./../../../..:/opt/nb
     - ./../../../../..:/opt
-    - ./../../../../lib/php/db:/var/www/html
+    - ./:/var/www/html
+    #- ./../../../../lib/php/db:/var/www/html
+  command:
+    - "/bin/echo HELLO > /HELLO"
   expose:
     - 9000
 
 nginx:
   build: ../../nginx/
   #image: nginx:latest
+  volumes_from:
+    - php
   ports:
     - 80:80
   links:
diff --git a/src/Docker/Compose/dbq/index.php b/src/Docker/Compose/dbq/index.php
new file mode 100644 (file)
index 0000000..c1bf87f
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+
+       <title>[% var.filename %] - [% user.me_now %]</title>
+
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+       <link href="" rel="stylesheet" type="text/css" />
+       <script type="text/javascript" src=""></script>
+
+  <meta name="Copyright" content="[% user.copyright %]"/>
+  <meta name="Author" content="[% user.name %]" />
+
+</head>
+
+<body>
+
+       <h1>APP</h1>
+</body>
+
+</html>
+
index 4e39274a8ed70733dea53bc638477467e055a2fe..ccdd0dacf7fd232ee489f04483690214c44817b7 100644 (file)
@@ -1,4 +1,4 @@
 FROM nginx:latest
 COPY ./default.conf /etc/nginx/conf.d/default.conf
-RUN mkdir -p /var/www/html && echo '<html><head>Hi</head><body><h1>Hi</h1></body></html>' > /var/www/html/index.html
+RUN mkdir -p /var/www/html && echo '<html><head><title>Welcom to Nginx</title></head><body><h1>Welcom to Nginx</h1></body></html>' > /var/www/html/index.html
 CMD nginx -g 'daemon off;'
index a3f65d0b1bbb4dc95d6c95dc9ce5101d0798329c..0898951c0e3d1d381666505078f2886a6911f579 100644 (file)
@@ -1,12 +1,13 @@
 FROM php:7.0-fpm-alpine
+RUN mkdir /opt
 
 # 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
-RUN mkdir /opt
+RUN mkdir -p /var/www/html && echo '<html><head><title>Welcom to php:7.0-fpm-alpine</title></head><body><h1>Welcom to php:7.0-fpm-alpine</h1></body></html>' > /var/www/html/index.php
 
 EXPOSE 9000
 #CMD ["/usr/local/bin/php", "-a"]
-CMD /usr/local/sbin/php-fpm
+ENTRYPOINT /usr/local/sbin/php-fpm