diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..98dc2fc --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,77 @@ +# nginxy +# - publiczny +nginxpublic: + build: images/nginx + volumes: + - "/opt/hangar18/configs/nginx-public/:/etc/nginx/sites-enabled:ro" + - "/opt/hangar18/logs/nginx-public/:/var/log/nginx/" + - "/opt/hangar18/run/php-fpm/:/var/run/php-fpm/" + - "/opt/hangar18/data/php-fpm/:/opt/php/" + links: + - etherpad + ports: + - "80:80" + - "443:443" + + +# - wewnętrzny +nginxinternal: + build: images/nginx + volumes: + - "/opt/hangar18/configs/nginx-internal/:/etc/nginx/sites-enabled:ro" + - "/opt/hangar18/logs/nginx-internal/:/var/log/nginx/" + - "/opt/hangar18/run/php-fpm/:/var/run/php-fpm/" + - "/opt/hangar18/data/php-fpm/:/opt/php/" + volumes_from: + - pgadmin + - rest + + +etherpad: + build: images/etherpad + links: + - postgres + volumes: + - "/opt/hangar18/logs/etherpad:var/log/etherpad" + + +# php-fpm front-endowy +# musi mieć dostęp do nginx.private, by robić restowe zapytania +# - frontend +frontend: + build: images/php-fpm + volumes: + - "/opt/hangar18/data/php-fpm/frontend/:/opt/php/frontend/" + - "/opt/hangar18/logs/php-fpm/:/var/log/php-fpm" + - "/opt/hangar18/run/php-fpm/:/var/run/php-fpm" + links: + - "nginxinternal:rest" + environment: + APP_NAME: "frontend" + +rest: + build: images/rest + volumes: + - "/opt/hangar18/logs/php-fpm/:/var/log/php-fpm" + - "/opt/hangar18/run/php-fpm/:/var/run/php-fpm" + links: + - postgres + environment: + APP_NAME: "rest" + + +pgadmin: + build: images/pgadmin + volumes: + - "/opt/hangar18/configs/pgadmin/:/opt/pgadmin/conf/:ro" + - "/opt/hangar18/logs/php-fpm/:/var/log/php-fpm" + - "/opt/hangar18/run/php-fpm/:/var/run/php-fpm" + links: + - postgres + + +postgres: + build: images/postgres + volumes: + - "/opt/hangar18/data/postgres:/var/lib/postgresql" + - "/opt/hangar18/logs/postgres:/var/log/postgresql" \ No newline at end of file diff --git a/images/pgadmin/Dockerfile b/images/pgadmin/Dockerfile index 7e13c1c..911d6b9 100644 --- a/images/pgadmin/Dockerfile +++ b/images/pgadmin/Dockerfile @@ -1,4 +1,4 @@ -FROM plug/php-fpm +FROM hangar18_frontend MAINTAINER Michał "rysiek" Woźniak ENV APP_NAME "pgadmin" diff --git a/images/php-fpm/Dockerfile b/images/php-fpm/Dockerfile index 518446f..6082b80 100644 --- a/images/php-fpm/Dockerfile +++ b/images/php-fpm/Dockerfile @@ -4,8 +4,10 @@ MAINTAINER Michał "rysiek" Woźniak # based on https://github.com/leoditommaso/docker_php-fpm/blob/master/Dockerfile # by Leandro Di Tommaso +ENV DEBIAN_FRONTEND noninteractive + # Packages to install on the container. -RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get upgrade && apt-get install -y \ +RUN apt-get update && apt-get -y upgrade && apt-get install -y \ php5-cgi php5-cli php5-fpm php5-curl php5-gd php5-imagick php5-imap \ php5-json php5-ldap php5-mcrypt php5-pgsql php5-odbc php5-sasl \ php5-xcache php5-xmlrpc php5-xsl diff --git a/images/postgres/Dockerfile b/images/postgres/Dockerfile index f260210..e24b1c6 100644 --- a/images/postgres/Dockerfile +++ b/images/postgres/Dockerfile @@ -16,7 +16,7 @@ RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/ # Install ``python-software-properties``, ``software-properties-common`` and PostgreSQL 9.3 # There are some warnings (in red) that show up during the build. You can hide # them by prefixing each apt-get statement with DEBIAN_FRONTEND=noninteractive -RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get upgrade && apt-get install -y python-software-properties software-properties-common postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 +RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get -y upgrade && apt-get install -y python-software-properties software-properties-common postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 # clear the data dir RUN rm -rf /var/lib/postgresql/9.3/ diff --git a/images/rest/Dockerfile b/images/rest/Dockerfile index 031b166..48e8f93 100644 --- a/images/rest/Dockerfile +++ b/images/rest/Dockerfile @@ -1,4 +1,4 @@ -FROM plug/php-fpm +FROM hangar18_frontend MAINTAINER Michał "rysiek" Woźniak ENV APP_NAME "rest" diff --git a/setup.sh b/setup.sh index 3ce7cf9..9d4ce68 100755 --- a/setup.sh +++ b/setup.sh @@ -179,7 +179,7 @@ fi if [[ "$mode" == "--kill" ]]; then - echo -ne "\n\nzabijamkontenery...\n" + echo -ne "\n\nzabijam kontenery...\n" docker kill $cnt_all docker rm -v $cnt_all