-
Clone the repo
git clone https://github.com/prohalexey/wheee.git -
Run containers
cd wheee && docker-compose up -d -
Install composer libraries
docker exec -it wheee-app composer install -
Add host
127.0.0.1 wheee.appintoLinux -
/etc/hostsWindows -
C:/Windows/System32/drivers/etc/hosts -
Init application
docker exec -it wheee-app php ./init -
Put into common/config/main-local.php
'db' => [ 'class' => 'yii\db\Connection', 'dsn' => 'pgsql:host=db;dbname=wheee', 'username' => 'wheee', 'password' => 'wheeepwd', 'charset' => 'utf8', ], -
Fill database with seeds via
docker exec -it wheee-app php yii seed/index -
Run the command
docker exec -it wheee-app php yii materialization/indexto refresh materialized View -
Open
wheee.appwebsite in the browser -
Put
php yii materialization/indexto the crontab and run each 10 minutes10 * * * *
-
Remove old certificates
rm -Rf .docker/nginx/certs/wheee.app.* -
Generate new certificates
docker-compose run --rm nginx sh -c "cd /etc/nginx/certs && touch openssl.cnf && cat /etc/ssl/openssl.cnf > openssl.cnf && echo \"\" >> openssl.cnf && echo \"[ SAN ]\" >> openssl.cnf && echo \"subjectAltName=DNS.1:wheee.app,DNS.2:*.wheee.app\" >> openssl.cnf && openssl req -x509 -sha256 -nodes -newkey rsa:4096 -keyout wheee.app.key -out wheee.app.crt -days 3650 -subj \"/CN=*.wheee.app\" -config openssl.cnf -extensions SAN && rm openssl.cnf"
-
sudo ln -s "$(pwd)/.docker/nginx/certs/wheee.app.crt" /usr/local/share/ca-certificates/wheee.app.crt sudo update-ca-certificates -
Just import
docker/nginx/certs/wheee.app.crtcertificate into the trusted root CA in the browser and reload the browser