Created
July 31, 2016 09:54
-
-
Save bangbambang/f72ba6d32eae0205390bf95b73c07d17 to your computer and use it in GitHub Desktop.
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: | |
| db: | |
| image: mysql | |
| ports: | |
| - "3306:3306" | |
| environment: | |
| MYSQL_ROOT_PASSWORD: katakunci | |
| MYSQL_DATABASE: symfony | |
| MYSQL_USER: root | |
| MYSQL_PASSWORD: katakunci | |
| volumes: | |
| - ./data/db:/var/lib/mysql | |
| networks: | |
| - backend | |
| php: | |
| build: ./php | |
| expose: | |
| - "9000" | |
| volumes: | |
| - ./data/web:/var/www/html | |
| - ./data/logs/php:/var/log/php | |
| links: | |
| - db | |
| networks: | |
| - backend | |
| - server | |
| nginx: | |
| build: ./nginx | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| volumes: | |
| - ./data/logs/nginx:/var/log/nginx | |
| links: | |
| - php | |
| volumes_from: | |
| - php | |
| networks: | |
| - server | |
| networks: | |
| backend: | |
| server: |
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
| # This is Dockerfile for nginx | |
| FROM alpine:3.4 | |
| MAINTAINER Bambang Catur Pamungkas <[email protected]> | |
| RUN adduser -u 1000 -HD -s /bin/false www-data | |
| RUN apk add --update nginx \ | |
| && rm -rf /var/cache/apk/* && rm -rf /tmp/* | |
| ADD nginx.conf /etc/nginx/ | |
| ADD localdev.crt /etc/nginx/ssl/ | |
| ADD localdev.key /etc/nginx/ssl/ | |
| ADD localsite /etc/nginx/sites-enabled/ | |
| ADD php-upstream.conf /etc/nginx/conf.d/ | |
| EXPOSE 80 | |
| EXPOSE 443 | |
| ENTRYPOINT ["nginx"] |
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
| # This is Dockerfile for php-fpm | |
| FROM alpine:3.4 | |
| MAINTAINER Bambang Catur Pamungkas <[email protected]> | |
| RUN apk add --update \ | |
| php5-fpm \ | |
| php5-apcu \ | |
| php5-ctype \ | |
| php5-curl \ | |
| php5-gd \ | |
| php5-iconv \ | |
| php5-imagick \ | |
| php5-json \ | |
| php5-intl \ | |
| php5-mcrypt \ | |
| php5-opcache \ | |
| php5-openssl \ | |
| php5-pdo \ | |
| php5-pdo_mysql \ | |
| php5-mysqli \ | |
| php5-xml \ | |
| php5-zlib \ | |
| && rm -rf /var/cache/apk/* && rm -rf /tmp/* | |
| ADD php-fpm.conf /etc/php5/ | |
| ADD ini-override.ini /etc/php5/conf.d/ | |
| RUN adduser -u 1000 -HD -s /bin/false www-data \ | |
| && mkdir /var/log/php \ | |
| && chown www-data /var/log/php \ | |
| && mkdir /run/php \ | |
| && chown www-data /run/php | |
| EXPOSE 9000 | |
| WORKDIR /var/www/html | |
| ENTRYPOINT ["php-fpm"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment