32 lines
846 B
Bash
Executable File
32 lines
846 B
Bash
Executable File
#!/bin/bash
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
PROJECT_DIR=$(realpath $SCRIPT_DIR/../../)
|
|
ENV_DIR=$(realpath $PROJECT_DIR/../../)
|
|
|
|
# Check .env file
|
|
if [ ! -f "$PROJECT_DIR/.env" ]
|
|
then
|
|
echo "Create .env file from example..."
|
|
cp "$PROJECT_DIR/.env.example" "$PROJECT_DIR/.env"
|
|
echo ".env file created, please change variables and call me again"
|
|
exit 1
|
|
fi
|
|
|
|
# Build and start docker containers
|
|
$SCRIPT_DIR/exec build
|
|
$SCRIPT_DIR/exec up -d
|
|
|
|
# Source drun
|
|
source $ENV_DIR/bin/script/drun
|
|
|
|
# Install PHP packages
|
|
drun myTube-backend composer install
|
|
|
|
# Migrate databases to current version
|
|
drun myTube-backend composer dmm
|
|
drun myTube-backend composer dmlm
|
|
|
|
# Insert setup for project after this line
|
|
drun myTube-backend composer console rbac:update
|
|
drun myTube-backend composer console init:data |