# it run server which shows us requests in the console
php bin/console server:dump
docker exec -it archivarius-build composer --dev symfony/phpunit-bridge
docker exec -it archivarius-build bin/phpunit
And after the first run there will be a folder .phpunit that we can use to connect PHPStorm
php bin/phpunit
./bin/console translation:update en --force
./bin/console translation:update ru --force
php bin/console debug:translation en --only-unused
php bin/console debug:translation en --only-missing
-
cd docker
-
docker-compose up -d
-
To rebuild this image you must use
docker-compose build
ordocker-compose up --build
-
TODO how to do that not with root? shell on install in commands? or Jenkins deploy?
-
TODO change permissions to the var? on setup?
-
docker exec -it archivarius-build composer install
-
docker exec -it archivarius-build yarn install
-
docker exec -it archivarius-build yarn build
for prod -
docker exec -it archivarius-build yarn dev
to build dev fe -
docker exec -it archivarius-build yarn watch
for fe development
with vagrant:
sudo apt install virtualbox
curl -O https://releases.hashicorp.com/vagrant/2.2.9/vagrant_2.2.9_x86_64.deb
sudo apt install ./vagrant_2.2.9_x86_64.deb
vagrant --version
On the Windows vagrant should be installed on both: windows and WSL side.
vagrant init debian/bullseye64
vagrant ssh
sudo vim .ssh/authorized_keys
// and add new ssh publick key there to make possibility to connect with ssh
After that we can test that ansible works:
ansible-playbook ci/ansible/playbook.yml -i ci/ansible/hosts.ini
;or
ansible vb -m ping -i ci/ansible/hosts.ini
to change hosts:
- run cmd as administrator
notepad C:\Windows\System32\drivers\etc\hosts
- add new record for vagrant
192.168.33.10 archivarius.vagrant
- update dns
ipconfig /flushdns
ansible-playbook ci/ansible/playbook.yml -i ci/ansible/hosts.ini
Run only jobs by tag
ansible-playbook ci/ansible/playbook.yml -i ci/ansible/hosts.ini -t php-extensions
ansible-vault create ci/ansible/vars/vault.yml
ansible-vault view ci/ansible/vars/vault.yml
ansible-vault edit ci/ansible/vars/vault.yml
variables
---
vauld_symfony_secret: "asdf1234"
vault_ssh_ip: "127.0.0.1"
vault_ssh_username: "www-data"
vault_basic_username: anyuser
vault_basic_password: anypassword
ansible-playbook ci/ansible/playbook.yml -i ci/ansible/hosts.ini -t php-extensions --ask-vault-pass
- Create VM f1-free tier?
- get IP
- and ssh to this env
- adding ssh
- Gotoconsole ssh
- press Edit
- Add item
- on the local machine:
cat ~/.ssh/id_ed25519.pub
- copy key and put it to the field, press save
- you can try ssh username@iptogcpvm