From b89bad9689af27748faf82d7ddb30804441cc3d7 Mon Sep 17 00:00:00 2001 From: kev Date: Fri, 18 Sep 2015 18:00:23 +0800 Subject: [PATCH] update nginad --- nginad/Dockerfile | 2 ++ nginad/README.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/nginad/Dockerfile b/nginad/Dockerfile index 8990ba4..c98ff18 100644 --- a/nginad/Dockerfile +++ b/nginad/Dockerfile @@ -15,6 +15,7 @@ RUN apk add -U ca-certificates \ php-json \ php-openssl \ php-pdo \ + php-pdo_mysql \ php-phar \ php-xml \ php-zlib \ @@ -31,6 +32,7 @@ RUN apk add -U ca-certificates \ && sed -i -e "s/'pass' => ''/'pass' => 'root'/" \ -e "s/'host' => 'localhost'/'host' => 'mysql'/" database.local.php \ && chown -R nobody:nobody . \ + && apk del git \ && rm -rf /var/cache/apk/* COPY nginx.conf /etc/nginx/nginx.conf diff --git a/nginad/README.md b/nginad/README.md index 475bc6a..2702b78 100644 --- a/nginad/README.md +++ b/nginad/README.md @@ -1,2 +1,30 @@ nginad ====== + +## docker-compose.yml + +``` +nginad: + image: vimagick/nginad + ports: + - "8080:80" + links: + - mysql + restart: always + +mysql: + image: mysql + environment: + - MYSQL_ROOT_PASSWORD=root + - MYSQL_DATABASE=nginad + restart: always +``` + +## run + +``` +$ fig up -d +$ wget https://nginad.atlassian.net/wiki/download/attachments/1114149/nginad-1.6.sql +$ docker exec -i nginad_mysql_1 mysql -u root -proot nginad < nginad-1.6.sql +$ fig restart +```