Skip to content

Instantly share code, notes, and snippets.

@chadrien
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadrien/7db44f6093682bf8320c to your computer and use it in GitHub Desktop.
Save chadrien/7db44f6093682bf8320c to your computer and use it in GitHub Desktop.
Docker/fig pour Magento avec apache/php53
<VirtualHost *:80>
DocumentRoot /data/projects/occitech/ferme-mohair/htdocs/
<Directory /data/projects/occitech/ferme-mohair/htdocs/>
Order allow,deny
Allow from all
Options +Indexes
AllowOverride all
</Directory>
</VirtualHost>
# only once
docker run -v /data --name docker-data busybox true
FROM ubuntu
MAINTAINER chadrien <chadrien@chadrien.fr>
ENV DEBIAN_FRONTEND noninteractive
RUN echo "deb http://archive.ubuntu.com/ubuntu precise universe main multiverse restricted" > /etc/apt/sources.list
RUN echo "deb http://security.ubuntu.com/ubuntu/ precise-security universe main multiverse restricted" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade
RUN apt-get -y install supervisor
RUN mkdir -p /etc/supervisor/conf.d
RUN echo "[supervisord]" > /etc/supervisor/conf.d/supervisord.conf
RUN echo "nodaemon=true" >> /etc/supervisor/conf.d/supervisord.conf
RUN apt-get -y install apache2
RUN a2enmod rewrite
RUN echo "[program:apache2]" >> /etc/supervisor/conf.d/supervisord.conf
RUN echo "command=/bin/bash -c \"source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND\"" >> /etc/supervisor/conf.d/supervisord.conf
RUN apt-get -y install php5 php5-mysql php5-gd php5-mcrypt php5-curl libapache2-mod-php5
ADD ./apache/default.conf /etc/apache2/sites-available/default
EXPOSE 80
CMD ["/usr/bin/supervisord"]
web:
build: .
volumes_from:
- data
links:
- db
ports:
- "49000:80"
db:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: "root"
volumes_from:
- data
command: "mysqld --datadir=/data/mysql --user=mysql --bind-address=0.0.0.0"
ports:
- "49001:3306"
<?xml version="1.0"?>
<!--
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Mage
* @package Mage_Core
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
-->
<config>
<global>
<install>
<date><![CDATA[Fri, 05 Sep 2014 16:17:36 +0200]]></date>
</install>
<crypt>
<key><![CDATA[51ed844b3777c40a0dd8dfa0c5599f90]]></key>
</crypt>
<disable_local_modules>false</disable_local_modules>
<resources>
<db>
<table_prefix><![CDATA[]]></table_prefix>
</db>
<default_setup>
<connection>
<host><![CDATA[192.168.59.103]]></host>
<port><![CDATA[49001]]></port>
<username><![CDATA[root]]></username>
<password><![CDATA[root]]></password>
<dbname><![CDATA[mohair]]></dbname>
<active>1</active>
</connection>
</default_setup>
</resources>
<session_save><![CDATA[files]]></session_save>
</global>
<admin>
<routers>
<adminhtml>
<args>
<frontName><![CDATA[admin]]></frontName>
</args>
</adminhtml>
</routers>
</admin>
</config>
docker run --rm -v /usr/local/bin/docker:/docker -v /var/run/docker.sock:/docker.sock svendowideit/samba docker-data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment