Commit fbb27344 authored by David Ivain's avatar David Ivain
Browse files

avancement Docker

parent f52ef25f
......@@ -2,8 +2,8 @@ FROM php:5.6-apache-stretch
RUN mkdir /persist
RUN apt-get update
# RUN apt-get upgrade
# RUN apt-get install wget -y
RUN apt-get install -y nano git bsdtar curl zip unzip
RUN apt-get install wget git -y
RUN apt-get install -y nano bsdtar curl zip unzip
RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer
......@@ -14,10 +14,12 @@ RUN export PATH="$HOME/.symfony/bin:$PATH"
RUN mv /root/.symfony/bin/symfony /usr/local/bin/symfony
WORKDIR /var/www/html
RUN git clone https://gitlab-fil.univ-lille.fr/mikael.salson/alecsia.git
RUN wget https://gitlab-fil.univ-lille.fr/mikael.salson/alecsia/-/archive/david/alecsia-david.zip
RUN unzip alecsia-david.zip
RUN mv alecsia-david alecsia
WORKDIR alecsia
RUN ls docker/persist
RUN cp ./docker/config/parameters.yml ./app/config/parameters.yml
RUN mkdir upload
# RUN rm composer.lock
# RUN COMPOSER_MEMORY_LIMIT=-1 composer install
# php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php
RUN composer install
RUN php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php
......@@ -2,17 +2,18 @@ version: '3'
services:
alecsia:
volumes:
- ./upload:/var/www/html/alecsia/upload
build: './alecsia'
ports:
- '8000:8000'
volumes:
- ./upload:/var/www/html/alecsia/upload
- ./persist:/persist
# depends_on:
# - mysql-db
# mysql-db:
# build: './mysql-db'
# command: --default-authentication-plugin=mysql_native_password
# restart: always
# environment:
# MYSQL_ROOT_PASSWORD: 123mdp
depends_on:
- mysql-db
mysql-db:
build: './mysql-db'
ports:
- '80:80'
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
......@@ -6,6 +6,7 @@ RUN mkdir /app
WORKDIR /app
RUN wget https://framagit.org/mikaels/teacherbook/-/archive/master/teacherbook-master.zip
RUN unzip teacherbook-master.zip
WORKDIR teacherbook-master
RUN mv teacherbook-master teacherbook
WORKDIR teacherbook
RUN composer install
RUN mysql -u root -e "CREATE DATABASE alecsialegacy" && mysql -u root alecsialegacy < dump.sql
RUN mysql -u root -e "CREATE DATABASE alecsia_legacy" && mysql -u root alecsia_legacy < dump.sql
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