Skip to content
Permalink
Browse files

Docker files

  • Loading branch information...
Kenji-K committed May 9, 2017
1 parent 860ad29 commit 00b69fe3a1a8f4891d2c5f4934c6b830dacc9641
Showing with 94 additions and 0 deletions.
  1. +43 −0 Dockerfile
  2. +51 −0 docker-compose.yml
@@ -0,0 +1,43 @@
FROM php:7.0-apache

MAINTAINER Kenji Kina <Kenji@analiticavisual.consulting>

RUN apt-get update && apt-get install -y \
cron \
mcrypt \
libmcrypt-dev \
libcurl4-openssl-dev \
libbz2-dev \
libgd-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
vim \
wget \
unzip \
git \
nano \
&& docker-php-ext-install -j$(nproc) curl \
&& docker-php-ext-install -j$(nproc) mcrypt \
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql \
&& docker-php-ext-install -j$(nproc) pdo_mysql \
&& docker-php-ext-install -j$(nproc) gd

RUN a2enmod rewrite

COPY . /var/www/html
WORKDIR /var/www/html

RUN chmod 777 admin/sd-system \
&& chmod 777 admin/sd-system/attachments \
&& chmod 777 admin/sd-system/exports \
&& chmod 777 custom/sessions \
&& chmod 777 custom/qrcodes \
&& chmod 777 custom/uploads

EXPOSE 80

COPY config/php.ini /usr/local/etc/php/

RUN chmod 777 /usr/local/etc/php/php.ini
@@ -0,0 +1,51 @@
version: "3"
services:
zenbership:
image: castlamp/zenbership:latest
ports:
- "80:80"
environment:
MYSQL_DATABASE: zenbership
MYSQL_PASSWORD: "change_password"
MYSQL_USER: zenbership_user
MYSQL_ROOT_PASSWORD: "change_password"
networks:
- zenbership-net
depends_on:
- mysql
deploy:
replicas: 1
resources:
limits:
cpus: "0.2"
memory: 300M
restart_policy:
condition: on-failure
mysql:
image: mysql:5.6.30
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: zenbership
MYSQL_PASSWORD: "change_password"
MYSQL_USER: zenbership_user
MYSQL_ROOT_PASSWORD: "change_password"
networks:
- zenbership-net
command: mysqld --sql_mode=NO_ENGINE_SUBSTITUTION
deploy:
placement:
constraints: [node.role == manager]
visualizer:
image: dockersamples/visualizer:stable
ports:
- "8091:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
deploy:
placement:
constraints: [node.role == manager]
networks:
- zenbership-net
networks:
zenbership-net:

0 comments on commit 00b69fe

Please sign in to comment.
You can’t perform that action at this time.