You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
2.5 KiB

  1. ## First
  2. Create alias for `docker-compose` command.
  3. `echo 'alias dc="docker-compose"' >> ~/.bash_aliases`
  4. Also, you have might be needed include `~/.bash_aliases` in your `~/.bashrc` file.
  5. Build all
  6. `dc build`
  7. ## Second
  8. Create usefully symlinks
  9. `./create-symlinks.sh`
  10. ## Get composer auth token
  11. If you do not have composer github auth.json file in `~/.composer` dir. You will need launch the helper-script:
  12. `./get-composer-auth.sh`
  13. ## Before use and launch
  14. You need copy `vhosts.conf.example` and edit this file - remove unused roots (or change to existing dirs).
  15. Setup correctly nginx config.
  16. You ready for up containers.
  17. `dc up -d`
  18. ## Database dumps
  19. Database dumps must be placement on `./hostfiles` directory.
  20. ## Bash scripts
  21. After execute created symlinks, you have some enter-points for vulnerable popular tasks.
  22. ### Xdebug
  23. For start debugging in php-fpm, also in workspace
  24. `./start-xdebug.sh [74|73]` - `74` by default
  25. For start debugging in php-fpm, also in workspace
  26. `./stop-xdebug.sh` or `./stop-xdebug.sh 73` if you launch start with php-version 73
  27. #### Xdebug with profiler
  28. Profiler saved your profiles into `/tmp` directory in own container.
  29. In docker-compose.base.yml exists volume that represent `/tmp` directory to `./data/profiler`.
  30. In this case `./data/profiler` must be have `777` chmod`s.
  31. For starting xdebug with profiler enable you might:
  32. `./start-xdebug.sh 74 1`
  33. Or
  34. `./start-xdebug.sh 74 profiler` if you like
  35. Second argument must be have any string
  36. For disable profiler - just simple launch
  37. `./quit-xdebug.sh`
  38. ### Mysql
  39. For import dumps from `hostfiles` directory you might be enter to mysql console:
  40. `./mysql.sh`
  41. Change you needed database and source to the `*.sql` dump.
  42. `use mydatabase`
  43. `source /hostfiles/mydatabase.sql`
  44. Dump must be extracted before source in mysql-cli
  45. ### Workspace
  46. For execute composer update|install or nodejs operations, also yarn, npm and all node-builds.
  47. You might use `workspace`-container
  48. For the enter to workspace container with php 7.4 you need launch usefully helper script in your home directory:
  49. `./enter-to-workspace.sh`
  50. For enter to `workspace` with php7.3 you need pass `73` container name suffix
  51. `./enter-to-workspace.sh 73`
  52. ### Nginx
  53. For restart `nginx` after some changes in nginx configuration, you might:
  54. `./restart-nginx.sh`
  55. ## Src build need DOCKER_BUILDKIT
  56. If you want build own workspace image. You need export environment variable
  57. `export DOCKER_BUILDKIT=1`
  58. more info https://github.com/edrevo/dockerfile-plus