1
|
#!/bin/bash
|
2
|
#Build development environment
|
3
|
docker-compose -f docker-compose.yml -f docker-compose-dev.yml up --build -d
|
4
|
echo "================= BUILDING DONE ==================="
|
5
|
cat << "EOF"
|
6
|
______ ______ __ __ ______ ______ ______ ______ ______ __ __ __ ______ ______ ______ __ __
|
7
|
/\ ___\/\ __ \/\ "-./ \/\ == /\ __ \/\ ___\/\ ___\/\ == \ /\ \/\ "-.\ \/\ ___\/\__ _/\ __ \/\ \ /\ \
|
8
|
\ \ \___\ \ \/\ \ \ \-./\ \ \ _-\ \ \/\ \ \___ \ \ __\\ \ __< \ \ \ \ \-. \ \___ \/_/\ \\ \ __ \ \ \___\ \ \____
|
9
|
\ \_____\ \_____\ \_\ \ \_\ \_\ \ \_____\/\_____\ \_____\ \_\ \_\ \ \_\ \_\\"\_\/\_____\ \ \_\\ \_\ \_\ \_____\ \_____\
|
10
|
\/_____/\/_____/\/_/ \/_/\/_/ \/_____/\/_____/\/_____/\/_/ /_/ \/_/\/_/ \/_/\/_____/ \/_/ \/_/\/_/\/_____/\/_____/
|
11
|
EOF
|
12
|
docker-compose exec php-fpm composer config extra.symfony.allow-contrib true --no-interaction --working-dir=/var/www/symfony
|
13
|
docker-compose exec php-fpm composer update --no-interaction --working-dir=/var/www/symfony
|
14
|
docker-compose exec php-fpm composer install --no-interaction --working-dir=/var/www/symfony
|
15
|
echo "================= COMPOSER INSTALL DONE ==================="
|
16
|
cat << "EOF"
|
17
|
________ ________ _____ ______ ___ ________ ________ _________ ________ ___ ___
|
18
|
|\ ___ \ |\ __ \ |\ _ \ _ \ |\ \ |\ ___ \ |\ ____\ |\___ ___\|\ __ \ |\ \ |\ \
|
19
|
\ \ \\ \ \\ \ \|\ \\ \ \\\__\ \ \ \ \ \\ \ \\ \ \\ \ \___|_\|___ \ \_|\ \ \|\ \\ \ \ \ \ \
|
20
|
\ \ \\ \ \\ \ ____\\ \ \\|__| \ \ \ \ \\ \ \\ \ \\ \_____ \ \ \ \ \ \ __ \\ \ \ \ \ \
|
21
|
\ \ \\ \ \\ \ \___| \ \ \ \ \ \ \ \ \\ \ \\ \ \\|____|\ \ \ \ \ \ \ \ \ \\ \ \____ \ \ \____
|
22
|
\ \__\\ \__\\ \__\ \ \__\ \ \__\ \ \__\\ \__\\ \__\ ____\_\ \ \ \__\ \ \__\ \__\\ \_______\\ \_______\
|
23
|
\|__| \|__| \|__| \|__| \|__| \|__| \|__| \|__||\_________\ \|__| \|__|\|__| \|_______| \|_______|
|
24
|
\|_________|
|
25
|
EOF
|
26
|
docker-compose exec -T php-fpm /bin/sh -c "cd /var/www/symfony && npm install && npm link webpack && npm run build"
|
27
|
echo "================= NPM INSTALL DONE ==================="
|
28
|
docker-compose exec -T crawler /bin/sh -c "cd /src && python docker_prepare_structure.py && echo '-all' | python force_update_datasets.py"
|
29
|
echo "================= LOADING DATASETS DONE ==================="
|