docker-compose.yml 1.03 KB
Newer Older
1
2
3
4
version: '3'

services:
  alecsia:
5
    build: './alecsia'
David Ivain's avatar
David Ivain committed
6
7
    volumes:
      - ./upload:/var/www/html/alecsia/upload
David Ivain's avatar
David Ivain committed
8
9
      - ./logs/alecsia:/var/www/html/alecsia/app/logs
      - ./logs/apache2:/var/log/apache2
10
11
      - ./alecsia/conf:/etc/alecsia
      - ./config:/etc/teacherbook
12
13
    ports:
      - '8000:8000'
14
      - '8080:80'
David Ivain's avatar
David Ivain committed
15
    command: bash -c "/var/www/html/wait-for-it.sh database:3306 --strict --timeout=300 && (php /var/www/html/alecsia/app/console doctrine:schema:create || php /var/www/html/alecsia/app/console doctrine:schema:update --force) && /etc/init.d/apache2 start && cat"
16
    tty: true
David Ivain's avatar
David Ivain committed
17
18
    links:
      - "mysql-db:database"
David Ivain's avatar
David Ivain committed
19
20
21
    depends_on:
      - mysql-db
  mysql-db:
22
23
24
    image: mysql:5.7.29
    volumes:
      - ./dump.sql:/docker-entrypoint-initdb.d/dump.sql
David Ivain's avatar
David Ivain committed
25
      - ./database:/var/lib/mysql
David Ivain's avatar
David Ivain committed
26
    ports:
27
      - "3306:3306"
28
    command: --default-authentication-plugin=mysql_native_password
David Ivain's avatar
David Ivain committed
29
30
    restart: always
    environment:
31
32
33
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=lille1teacherbook
      - MYSQL_ROOT_HOST=%