forked from spiral/app-keeper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerInit.sh
executable file
·12 lines (12 loc) · 968 Bytes
/
dockerInit.sh
1
2
3
4
5
6
7
8
9
10
11
12
[ ! -f .env ] && cp .env.sample .env
docker-compose up -d --build && \
docker cp keeper:/var/www/.env . && \
docker cp keeper:/var/www/vendor . && \
docker cp keeper-nginx:/usr/share/nginx/html/generated ./public && \
docker-compose -f docker-compose.yml -f docker-compose-local.yml -f docker-compose-custom-front-local.yml up -d
docker exec keeper bash -c "../server/wait-for-it.sh keeper-db:3306 -t 15 -- php app.php encrypt:key -m .env"
docker exec keeper bash -c "../server/wait-for-it.sh keeper-db:3306 -t 15 -- php app.php configure -vv"
docker exec keeper bash -c "../server/wait-for-it.sh keeper-db:3306 -t 15 -- php app.php migrate:init"
docker exec keeper bash -c "../server/wait-for-it.sh keeper-db:3306 -t 15 -- php app.php migrate"
docker-compose -f docker-compose.yml -f docker-compose-local.yml -f docker-compose-custom-front-local.yml stop
docker-compose -f docker-compose.yml -f docker-compose-local.yml -f docker-compose-custom-front-local.yml up -d