tutfw/tutfw-project

Tutfw-Project is new PHP microservice based project.

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/tutfw/tutfw-project

1.0.2 2023-01-11 12:34 UTC

This package is auto-updated.

Last update: 2025-12-11 18:55:58 UTC


README

Powered by https://github.com/mehdiable/tutfw-project

Author https://github.com/mehdiable

Contact https://www.linkedin.com/in/mehdi-mohammadnejad

tutfw project

Make your microservice and enjoy :

git

requirements

  • docker
  • git

Initializing new project

  • cd docker/phpfpm
  • docker build -t phpfpm:8.1.8 .
  • cd docker/mongodb
  • docker build -t mongodb:5.0.9 .
  • cd root folder of project that have development.yml file
  • docker stack deploy -c development.yml development
  • docker exec -it development_webapp.1 bash
  • cd main && composer install && composer dump-autoload

NOTE :

  • change server_name development.local; in docker/nginx/conf.d/default_dev.conf and server_name product.local; in docker/nginx/conf.d/default.conf by your project domain
  • if you change development project name, must be change nginx default.conf file in : server development_webapp:9000; in docker/nginx/conf.d/(default_dev.conf and default.conf)
  • ports is important, check the nginx config files and yml file

MongoDb Management

  • docker exec -it development_mongo... bash
  • mongo -u MONGO_INITDB_ROOT_USERNAME -p
  • enter: MONGO_INITDB_ROOT_PASSWORD
  • use database_name # defined on conf/db.php
  • db.createUser({user: "admin_username", pwd: passwordPrompt(), roles: [{ role: "readWrite", db: "app_service" }], mechanisms: [ "SCRAM-SHA-256"]});
  • enter password for exam_admin user

server side

  • make vhost
  • set dns in /etc/hosts