Important
In the docker directory go over:
$ cd dev/project/
$ git clone git@github.com:alexfer/rgfly.git
$ cd rgfly
$ cp .env.dist .env # symfony configuration
$ composer install
$ npm install
$ npm run dev --watch
$ cd dev/project/
$ git clone git@github.com:alexfer/nodejs.git
$ cd nodejs
$ cp .env.dist .env # node configuration
$ npm install
$ cd docker
$ cp .env.dist .env
$ docker-compose up -d --build
./clear-logs.sh
Login to postgres container:
$ docker exec -it postgres sh
psql -U postgres
Next step:
DROP ROLE IF EXISTS rgfly; -- optional
CREATE USER rgfly WITH password 'rgfly';
ALTER USER rgfly WITH SUPERUSER;
ALTER USER rgfly CREATEDB;
CREATE DATABASE rgfly OWNER rgfly;
GRANT ALL PRIVILEGES ON DATABASE rgfly TO rgfly;
Deploy database:
$ docker exec -it php bash
$ cd rgfly
$ rm -rfv src/Migrations/* # optional
$ php bin/console doctrine:database:drop --if-exists --force # optional
$ php bin/console doctrine:database:create # optional
$ php bin/console make:migration --no-interaction # optional
$ php bin/console doctrine:migrations:migrate --no-interaction
$ php bin/console doctrine:fixtures:load --no-interaction
$ php bin/console app:functions:import --no-interaction
Clear database Redis:
docker exec -it redis redis-cli FLUSHALL