Commit 57f177e0 authored by David Ivain's avatar David Ivain
Browse files

suppression du dockerfile pour mysql, importation du dump.sql au démarrage

parent 02b3605c
......@@ -2,33 +2,23 @@ version: '3'
services:
alecsia:
build: './alecsia'
volumes:
- ./upload:/var/www/html/alecsia/upload
build: './alecsia'
ports:
- '8000:8000'
# networks:
# alecsia_net:
# ipv4_address: 172.19.0.2
links:
- "mysql-db:database"
depends_on:
- mysql-db
mysql-db:
build: './mysql-db'
image: mysql:5.7.29
volumes:
- ./dump.sql:/docker-entrypoint-initdb.d/dump.sql
ports:
- '80:80'
- "3306:3306"
command: --default-authentication-plugin=mysql_native_password
# networks:
# alecsia_net:
# ipv4_address: 172.19.0.3
# command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
# networks:
# alecsia_net:
# ipam:
# driver: default
# config:
# - subnet: 172.19.0.0/29
\ No newline at end of file
MYSQL_DATABASE: lille1teacherbook
\ No newline at end of file
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
CREATE TABLE IF NOT EXISTS `teacher` (
`login` varchar(200) NOT NULL DEFAULT '',
`email` varchar(200) DEFAULT NULL,
`firstName` varchar(200) DEFAULT NULL,
`lastName` varchar(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Contenu de la table `teacher`
--
INSERT INTO `teacher` (`login`, `email`, `firstName`, `lastName`) VALUES
('hopper', 'Grace.Hopper@navy.gov', 'Grace', 'Hopper'),
('turing', 'Alan.Turing@enigma.uk', 'Alan', 'Turing');
--
-- Index pour les tables exportées
--
--
-- Index pour la table `teacher`
--
ALTER TABLE `teacher`
ADD PRIMARY KEY (`login`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
FROM mysql:5.7.29
ARG MYSQL_ROOT_PASSWORD=root
RUN apt-get update && apt-get install -y wget unzip curl
# RUN curl -sS https://getcomposer.org/installer
# RUN mv composer.phar /usr/local/bin/composer
RUN mkdir /app
WORKDIR /app
RUN wget https://framagit.org/mikaels/teacherbook/-/archive/master/teacherbook-master.zip
RUN unzip teacherbook-master.zip
WORKDIR /app/teacherbook-master
# RUN composer install
# RUN /etc/init.d/mysql start
# RUN mysql -h 127.0.0.1 -P 3306 -u root -p${MYSQL_ROOT_PASSWORD} -e "CREATE DATABASE lille1teacherbook"
# RUN mysql -h 127.0.0.1 -u root -p${MYSQL_ROOT_PASSWORD} -D lille1teacherbook < dump.sql
# RUN cp ../alecsia/docker/config/config.php config.php
\ 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