Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.3'
- services:
- nginx:
- image: nginx:1.15.8-alpine
- container_name: nginx
- ports:
- - 8000:80
- volumes:
- - ./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf
- - ./web:/var/www/html
- - ./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template
- - ./etc/logs/nginx:/var/log/nginx
- environment:
- - NGINX_HOST=${NGINX_HOST}
- links:
- - php
- - mysqldb
- restart: always
- php:
- build:
- context: .
- dockerfile: ./etc/php/Dockerfile
- container_name: php
- volumes:
- - ./web:/var/www/html
- - ./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini
- links:
- - mysqldb
- restart: always
- mysqldb:
- image: mysql:${MYSQL_VERSION}
- container_name: ${MYSQL_HOST}
- ports:
- - 8989:3306
- env_file:
- - web/.env
- environment:
- - MYSQL_DATABASE=${MYSQL_DATABASE}
- - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- - MYSQL_USER=${MYSQL_USER}
- - MYSQL_PASSWORD=${MYSQL_PASSWORD}
- volumes:
- - ./etc/db/mysql:/var/lib/mysql
- restart: always
- FROM php:7.2-fpm
- WORKDIR '/var/www/html'
- RUN apt-get update
- RUN apt-get install -y
- curl
- wget
- git
- RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- RUN docker-php-ext-install pdo_mysql
- RUN echo "alias phinx='php src/vendor/bin/phinx'" >> ~/.bashrc
Add Comment
Please, Sign In to add comment