Commit 47ccb0dc authored by Sebastien Rosset's avatar Sebastien Rosset

Installation through Docker

parent bff09c07
......@@ -30,3 +30,5 @@ ssh_password
\ No newline at end of file
......@@ -19,7 +19,6 @@ imports:
locale: fr
mongodb_server: "mongodb://localhost:27017" '%base_url%'
router.request_context.base_url: '%base_path%'
......@@ -31,3 +31,6 @@ parameters:
oauth_google_secret: "disabled"
oauth_facebook_id: "disabled"
oauth_facebook_secret: "disabled"
mongodb_server: "mongodb://localhost:27017"
\ No newline at end of file
version: '2'
build: server
container_name: gogocarto
- ..:/var/www
- "80:80"
- mongo:mongo
image: mongo:3.4.18-jessie
container_name: mongo
- ./.mongo:/data/db
- "27017:27017"
\ No newline at end of file
FROM php:5.6-apache
RUN apt-get update
RUN apt-get install --yes --force-yes cron g++ gettext libicu-dev openssl libc-client-dev libkrb5-dev libxml2-dev libfreetype6-dev libgd-dev libmcrypt-dev bzip2 libbz2-dev libtidy-dev libcurl4-openssl-dev libz-dev libmemcached-dev libxslt-dev gnupg nano git
# PHP Configuration
RUN docker-php-ext-install bcmath
RUN docker-php-ext-install bz2
RUN docker-php-ext-install calendar
RUN docker-php-ext-install dba
RUN docker-php-ext-install curl
RUN docker-php-ext-install exif
RUN docker-php-ext-configure gd --with-freetype-dir=/usr --with-jpeg-dir=/usr
RUN docker-php-ext-install gd
RUN docker-php-ext-install gettext
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl
RUN docker-php-ext-install imap
RUN docker-php-ext-install intl
RUN docker-php-ext-install mcrypt
RUN docker-php-ext-install mysql mysqli pdo pdo_mysql
RUN docker-php-ext-install soap
RUN docker-php-ext-install tidy
RUN docker-php-ext-install xmlrpc
RUN docker-php-ext-install mbstring
RUN docker-php-ext-install simplexml
RUN docker-php-ext-install xsl
RUN docker-php-ext-install zip
RUN docker-php-ext-configure hash --with-mhash
# Apache Configuration
RUN a2enmod rewrite
RUN a2enmod headers
RUN a2enmod ssl
RUN a2ensite default-ssl
RUN openssl req -subj '/ Company Name LTD./C=US' -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem
# Imagemagick
RUN apt-get install --yes --force-yes libmagickwand-dev libmagickcore-dev
RUN yes '' | pecl install -f imagick
RUN docker-php-ext-enable imagick
# Composer
COMPOSER_SIG=$(curl -L \
&& php -r "copy('', 'composer-setup.php');" \
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === '$COMPOSER_SIG') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& mv composer.phar /usr/local/bin/composer
# MongoDB extension
RUN pecl install mongodb \
&& docker-php-ext-enable mongodb
# Node & NPM
RUN curl -sL | bash -
RUN apt-get --yes --force-yes install nodejs
# Gulp
RUN npm install -g gulp
# Config files
COPY custom-php-conf.ini /usr/local/etc/php/conf.d/
COPY apache.conf /etc/apache2/sites-available/000-default.conf
# We don't need this directory
RUN rm -R /var/www/html
WORKDIR /var/www/web
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerAdmin webmaster@localhost
DocumentRoot /var/www/web
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
date.timezone = "Europe/Paris"
memory_limit = 1000M
\ No newline at end of file
Installation and Production Instructions
*Last update : 2018/06/04*
*Last update : 2019/01/04*
Feel free to add some more informations if you solve installation issues !
**There is a script for debian installation** named in this docs directory ! After installation completed, go to http://localhost/GoGoCarto/web/app_dev.php/project/initialize to initialize your project
Quick install
- **Debian script**: there is a script for debian installation named in this docs directory ! After installation, go to http://localhost/GoGoCarto/web/app_dev.php/project/initialize to initialize your project.
- **Docker containers**: please follow the instructions [here](
......@@ -23,6 +28,8 @@ To do so, please run :
composer config "platform.ext-mongo" "1.6.16" && composer require alcaeus/mongo-php-adapter
Consider the [Docker installation]( if you run into troubles installing these softwares.
......@@ -38,7 +45,7 @@ Php dependency (symfony, bundles...)
composer install
*During installation, config/parameters file will be created, leave default fields*
*During installation, app/config/parameters.yml file will be created, leave default fields*
Workflow dependencies (compiling sass and javascript)
Installation under Docker
With the Docker installation, you have all the required softwares installed in two containers (gogocarto and mongo)
* Go to the /docker sub-directory
* Run `docker-compose build` to build the containers image
* Run `docker-compose up` to launch the containers
* Enter the `gogocarto` container with this command: `docker exec -it gogocarto bash`
* Run all the commands given in the [installation instructions]( (composer, npm, gulp, symfony console commands...)
* **Warning**: During the `composer install`, when the script asks you for the parameters value, don't use the default value of the `mongodb_server` config. Use `mongodb://mongo:27017` instead of the default `mongodb://localhost:27017` value.
* Go to `http://localhost/app_dev.php/project/initialize` to initialize the project
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment