Commit 4167e013 authored by arnaudbey's avatar arnaudbey
Browse files

test docker

parents
# MySQL
MYSQL_ROOT_PASSWORD=root
# Timezone
TIMEZONE=Europe/Paris
#nginx port
PORT=666
#port PhpMyAdmin
PORTPMA=8080
application/lexicon.sql filter=lfs diff=lfs merge=lfs -text
/logs
/.data
.env
application/.web-server-pid
application/app/config/parameters.yml
application/build/
application/phpunit.xml
application/var/*
!application/var/cache
application/var/cache/*
!application/var/cache/.gitkeep
application/var/data/*
!application/var/data/.gitkeep
!application/var/logs
application/var/logs/*
!application/var/logs/.gitkeep
!application/var/sessions
application/var/sessions/*
!application/var/sessions/.gitkeep
!application/var/SymfonyRequirements.php
application/vendor/
application/node_modules/
application/web/bundles/
application/web/js/*
application/web/css/*
application/web/assets/
application/bower_components/*
application/web/fonts/*
!application/web/fonts/*/
application/web/upload/profilepic/*
!application/web/upload/profilepic/.gitkeep
application/web/files/*
!aplication/web/files/.gitkeep
# Installation
```
git clone git@gricad-gitlab.univ-grenoble-alpes.fr:lzbk/MagicWord.git
cd MagicWord
cp .env.dist .env
vi .env
docker-compose up --build -d
docker-compose exec php PWD=rootpassword make install
```
MIT License
Copyright (c) [2017] [Innovalangues]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
magicword
=========
A Symfony3 project developed mostly ([see all contributors](CONTRIBUTORS.md)) by Arnaud Bey and based on :
* https://github.com/InnovaLangues/Magic-Word-game : the first prototype, augmented little by little by various persons from the initial code of Pauline Rebourgeon and Christine Lutian ;
* https://github.com/giacomo-mambelli/magicword : the "Bologne" prototype, coded by Giacomo Mambelli, contains the infamous "Bologna algorithm" cf. [Associated research](#Associated research) that allows the [conquer mode](https://github.com/InnovaLangues/MagicWord/wiki/Conquer).
See [the wiki](https://gricad-gitlab.univ-grenoble-alpes.fr/lzbk/MagicWord/wikis/home) for more information (or you can have a look at our [French teaser](https://vimeo.com/216809745)).
### Sounds
All sounds come from [freesound.org](http://www.freesound.org/) and are licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/). They've been converted to mp3 when needed :
* http://www.freesound.org/people/chripei/sounds/165492/
* http://www.freesound.org/people/sandyrb/sounds/41381/
* http://www.freesound.org/people/zgump/sounds/82523/
* http://www.freesound.org/people/FOSSA11/sounds/49306/
* http://www.freesound.org/people/rhodesmas/sounds/320655/
* http://www.freesound.org/people/Autistic%20Lucario/sounds/142608/
* http://www.freesound.org/people/cabled_mess/sounds/360602/
* http://www.freesound.org/people/Taira%20Komori/sounds/212527/
### Dictionaries
* French - [Morphalou3](https://repository.ortolang.fr/api/content/morphalou/2/LISEZ_MOI.html#idp37270384) (LGPL-LR)
* English - [DELA](http://infolingu.univ-mlv.fr/DonneesLinguistiques/Dictionnaires/telechargement.html) (LGPL-LR)
Associated research
-------------------
Magic Word is part of the research carried out at the [LIDILEM lab](http://lidilem.u-grenoble3.fr) :
* [10.4000/alsic.2828](http://dx.doi.org/10.4000/alsic.2828) : 1st paper, the ideas behind the game
* [10.1109/ICCNC.2016.7440546](http://sci-hub.cc/10.1109/ICCNC.2016.7440546) : the "Bologna algorithm"
* [10.14705/rpnet.2016.eurocall2016.575](https://halshs.archives-ouvertes.fr/halshs-01422328) : en route to this new version
* this game integrated in a global serious game development strategy :
* [10.4000/apliut.5742](http://dx.doi.org/10.4000/apliut.5742)
* [alsic.revues.org/3037](https://alsic.revues.org/3037)
Financing and context
---------------------
Magic Word was designed and implemented within the GAMER workpackage that was created inside the [Innovalangues](http://innovalangues.fr/realisations/ressources-ludiques/) [IDEFI](http://www.agence-nationale-recherche.fr/investissements-d-avenir/appels-a-projets/2011/initiatives-dexcellence-en-formations-innovantes-idefi/) project. It was mostly (but not exclusively) financed by Innovalangues, which is a project of [Univ. Grenoble Alpes](http://univ-grenoble-alpes.fr). Its creation mostly comes from the goodwil and dedication of the GAMER members ([interns or otherwise](CONTRIBUTORS.md)).
Install
-------
see [INSTALL.md](INSTALL.md)
application @ 40578354
Subproject commit 4057835421e637dd9ceaeeecc2fb5f6e4f46743a
[mysqld]
ft_min_word_len = 2
ft_stopword_file = ""
version: '2'
services:
db:
image: mariadb
volumes:
- "./.data/db:/var/lib/mysql"
- "./dbconf:/etc/mysql/conf.d"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
php:
build:
context: php7-fpm
args:
TIMEZONE: ${TIMEZONE}
volumes:
- ./application:/var/www/symfony
- /var/www/var/sessions:/var/www/symfony/var/session
nginx:
build: nginx
ports:
- "${PORT}:80"
volumes_from:
- php
volumes:
- ./logs/nginx/:/var/log/nginx
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- "${PORTPMA}:80"
links:
- db
FROM debian:jessie
MAINTAINER Arnaud BEY
RUN apt-get update && apt-get install -y \
nginx
ADD nginx.conf /etc/nginx/
ADD symfony.conf /etc/nginx/sites-available/
RUN ln -s /etc/nginx/sites-available/symfony.conf /etc/nginx/sites-enabled/symfony
RUN rm /etc/nginx/sites-enabled/default
RUN echo "upstream php-upstream { server php:9000; }" > /etc/nginx/conf.d/upstream.conf
RUN usermod -u 1000 www-data
CMD ["nginx"]
EXPOSE 80
EXPOSE 443
user www-data;
worker_processes 8;
pid /run/nginx.pid;
events {
accept_mutex on;
worker_connections 2048;
multi_accept on;
use epoll;
}
http {
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log off;
error_log off;
gzip on;
gzip_comp_level 5;
gzip_min_length 1000;
gzip_proxied any;
gzip_types
application/atom+xml
application/javascript
application/json
application/ld+json
application/manifest+json
application/rss+xml
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/bmp
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
open_file_cache max=2000 inactive=5m;
open_file_cache_valid 2m;
open_file_cache_min_uses 2;
open_file_cache_errors on;
}
daemon off;
server {
server_name testdocker.elan-numerique.fr;
root /var/www/symfony/web;
location / {
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
location ~ ^/(app|app_dev|config)\.php(/|$) {
fastcgi_pass php-upstream;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
error_log /var/log/nginx/symfony_error.log;
access_log /var/log/nginx/symfony_access.log;
}
FROM php:7.1-fpm
ARG TIMEZONE
MAINTAINER Arnaud BEY
RUN apt-get update && apt-get install -y \
acl \
apt-utils \
openssl \
git \
vim \
unzip \
libcurl4-gnutls-dev zlib1g-dev libicu-dev g++ libxml2-dev libpq-dev libxslt-dev
RUN apt-get install -y nodejs
RUN apt-get install -y mysql-client
RUN apt-get install -y make
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer --version
RUN curl -o /usr/local/bin/n https://raw.githubusercontent.com/visionmedia/n/master/bin/n
RUN chmod +x /usr/local/bin/n
RUN n stable
# Set timezone
RUN ln -snf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime && echo ${TIMEZONE} > /etc/timezone
RUN printf '[PHP]\ndate.timezone = "%s"\n', ${TIMEZONE} > /usr/local/etc/php/conf.d/tzone.ini
RUN "date"
# Type docker-php-ext-install to see available extensions
RUN docker-php-ext-install pdo pdo_mysql intl curl json opcache xml xsl
# install xdebug
RUN pecl install apcu
RUN pecl install xdebug
RUN docker-php-ext-enable xdebug
RUN echo "error_reporting = E_ALL" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "display_startup_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "display_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.idekey=\"PHPSTORM\"" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_port=9001" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo 'alias sf3="php bin/console"' >> ~/.bashrc
WORKDIR /var/www/symfony
Supports Markdown
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