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

wait-for-it + persist log

parent e92e1c3a
......@@ -26,3 +26,4 @@ upload/*
/doc/user/manual.html
/demo
/docker/upload/*
/docker/database
......@@ -19,6 +19,8 @@ RUN mv /root/.symfony/bin/symfony /usr/local/bin/symfony
WORKDIR /var/www/html
RUN wget https://gitlab-fil.univ-lille.fr/mikael.salson/alecsia/-/archive/david/alecsia-david.zip
RUN unzip alecsia-david.zip
RUN wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh
RUN chmod +x wait-for-it.sh
RUN rm alecsia-david.zip
RUN mv alecsia-david alecsia
WORKDIR /var/www/html/alecsia
......
......@@ -5,10 +5,12 @@ services:
build: './alecsia'
volumes:
- ./upload:/var/www/html/alecsia/upload
- ./logs/alecsia:/var/www/html/alecsia/app/logs
- ./logs/apache2:/var/log/apache2
ports:
- '8000:8000'
- '8080:80'
command: bash -c "(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"
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"
tty: true
links:
- "mysql-db:database"
......@@ -18,6 +20,7 @@ services:
image: mysql:5.7.29
volumes:
- ./dump.sql:/docker-entrypoint-initdb.d/dump.sql
- ./database:/var/lib/mysql
ports:
- "3306:3306"
command: --default-authentication-plugin=mysql_native_password
......
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