@ -0,0 +1,35 @@ | |||||
version: '3' | |||||
services: | |||||
webserver: | |||||
build: ./docker/apache | |||||
restart: unless-stopped | |||||
depends_on: | |||||
- db | |||||
volumes: | |||||
- .:/var/www/html:cached | |||||
ports: | |||||
- ${portWebserver}:80 | |||||
db: | |||||
image: mysql:5.7 | |||||
restart: unless-stopped | |||||
volumes: | |||||
- db_data:/var/lib/mysql | |||||
- ./docker/tmp:/tmp | |||||
- ./docker/database:/docker-entrypoint-initdb.d/ | |||||
ports: | |||||
- ${portDatabase}:3306 | |||||
environment: | |||||
MYSQL_ROOT_PASSWORD: root | |||||
MYSQL_DATABASE: ${dbName} | |||||
MYSQL_USER: ${dbUser} | |||||
MYSQL_PASSWORD: ${dbPassword} | |||||
redis: | |||||
image: redis:5 | |||||
restart: unless-stopped | |||||
volumes: | |||||
- redis_data:/data | |||||
volumes: | |||||
db_data: | |||||
redis_data: |
@ -0,0 +1,8 @@ | |||||
<VirtualHost *:80> | |||||
ServerName localhost | |||||
DocumentRoot "/var/www/html/compass/public" | |||||
<Directory "/var/www/html/compass/public"> | |||||
AllowOverride All | |||||
Require all granted | |||||
</Directory> | |||||
</VirtualHost> |
@ -0,0 +1,26 @@ | |||||
FROM php:7.1-apache-jessie | |||||
RUN apt-get update --fix-missing | |||||
RUN apt-get -y install sudo &&\ | |||||
apt-get -y install curl &&\ | |||||
apt-get -y install git &&\ | |||||
apt-get -y install zip unzip &&\ | |||||
apt-get -y install vim && \ | |||||
apt-get -y install libicu-dev | |||||
RUN docker-php-ext-configure intl | |||||
RUN docker-php-ext-install pdo pdo_mysql mysqli intl | |||||
RUN curl -sS https://getcomposer.org/installer | php && chmod +x composer.phar && mv composer.phar /usr/local/bin/composer | |||||
RUN a2enmod rewrite | |||||
RUN echo "ServerName compass" | sudo tee /etc/apache2/conf-available/servername.conf && a2enconf servername | |||||
COPY ./000-default.conf /etc/apache2/sites-enabled/000-default.conf | |||||
RUN apachectl graceful |
@ -0,0 +1,14 @@ | |||||
#!/bin/bash | |||||
export projectName='compass' | |||||
export dbName=${projectName} | |||||
export dbUser='user' | |||||
export dbPassword='user' | |||||
export portWebserver='80' | |||||
export portDatabase='3306' | |||||
docker-compose -f docker-compose.yml -p ${projectName} build | |||||
@ -0,0 +1,14 @@ | |||||
#!/bin/bash | |||||
export projectName='compass' | |||||
export dbName=${projectName} | |||||
export dbUser='user' | |||||
export dbPassword='user' | |||||
export portWebserver='80' | |||||
export portDatabase='3306' | |||||
docker-compose -f docker-compose.yml -p ${projectName} down | |||||
@ -0,0 +1,14 @@ | |||||
#!/bin/bash | |||||
export projectName='compass' | |||||
export dbName=${projectName} | |||||
export dbUser='user' | |||||
export dbPassword='user' | |||||
export portWebserver='80' | |||||
export portDatabase='3306' | |||||
docker-compose -f docker-compose.yml -p ${projectName} up -d | |||||