{"id":22843240,"url":"https://github.com/jafaripur/local-backend-dev","last_synced_at":"2026-04-08T18:31:32.889Z","repository":{"id":87281112,"uuid":"404333356","full_name":"jafaripur/local-backend-dev","owner":"jafaripur","description":"Local development configuration env with ansible and docker.","archived":false,"fork":false,"pushed_at":"2022-09-10T06:10:38.000Z","size":213,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T05:11:28.383Z","etag":null,"topics":["ansible","bash","docker","linux"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jafaripur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-08T12:08:49.000Z","updated_at":"2022-03-10T14:44:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"89112af1-e579-4434-804b-31301ee9860c","html_url":"https://github.com/jafaripur/local-backend-dev","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jafaripur/local-backend-dev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jafaripur%2Flocal-backend-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jafaripur%2Flocal-backend-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jafaripur%2Flocal-backend-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jafaripur%2Flocal-backend-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jafaripur","download_url":"https://codeload.github.com/jafaripur/local-backend-dev/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jafaripur%2Flocal-backend-dev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31568586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","bash","docker","linux"],"created_at":"2024-12-13T02:13:32.528Z","updated_at":"2026-04-08T18:31:32.865Z","avatar_url":"https://github.com/jafaripur.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local system configuration for back-end development\n\nLocal development system configuration with `Ansible` and `Docker`.\n\n## Stacks\n\nLocal development stacks:\n\n- Nginx\n- PHP-FPM (7, 8, 8.1)\n- PHP-CLI (7, 8, 8.1)\n- Composer\n- MySQL\n- PHPMyAdmin\n- Redis\n- Elasticsearch\n- MongoDB\n- Mongo Express\n- Go\n- PostgreSQL\n- phpPgAdmin\n- RabbitMQ\n- NodeJs (NPM, Yarn, Gulp)\n\n## Install Ansible\n\nRun command for install ansible and ansible collection and roles.\n\n```\n./install.sh\n```\n\n## Secret for password\n\nCreate vault file with secret and change configuration:\n\n```\nopenssl rand -base64 50 \u003e .vault_password\n\ncp inventory/host_vars/araz/vault.sample inventory/host_vars/araz/vault.yml\n\ncat inventory/host_vars/araz/vault.yml  #Change content of vault file.\n\n```\n\n### Encrypt secret\n\n```\nansible-vault encrypt inventory/host_vars/araz/vault.yml\n```\n\n### MongoDB KeyFile\n\nFor replica in mongodb create key file. By default MongoDB start standalone.\n\n```\nopenssl rand -base64 756 \u003e playbooks/application/templates/docker/mongodb/config/keyfile\n\nansible-vault encrypt playbooks/application/templates/docker/mongodb/config/keyfile\n\n```\n\n## Configuration\n\nConfiguration available in `inventory/host_vars/araz/vars.yml`, Can change as need.\n\nFor example path of php projects folder to use in nginx or php-fpm change this variable: `php_project_path` or for docker files should be copy: `application_working_path`\n\n## Running playbook\n\nFor first time system configuration use this playbook to apply changes:\n\n```\nansible-playbook playbooks/all.yml -K\n```\n\nrun this one for copy docker files:\n\n```\nansible-playbook playbooks/application/docker.yml -K  # This can be run several time for update docker config or shell script.\n\nansible-playbook playbooks/application/logrotate.yml -K # This is for logrotate\n```\n\nDocker file available in this variable path `application_working_path` which is defined in host var file.\n\n## Aliases\n\nThis aliases defined in bash configuration for easy access to container.\n\n```\nmongo --version      # Mongosh shell\npostgres --version   # psql -U postgres --version\nredis --version      # Redis cli\nnginx -v             # nginx -t\nmysql --version\nphp7 --version       # PHP 7.4\nphp8 --version       # PHP 8.0\nphp81 --version      # PHP 8.1\nphp81-port app.php   # PHP 8.1 Start with port\ncomposer7 --version  # PHP 7.4\ncomposer8 --version  # PHP 8.0\ncomposer81 --version # PHP 8.1\ngo version\nrabbitmq --version   # same as rabbitmqctl\nnode --version\nnode npm --version\nnode yarn --version\nnode gulp --version\n```\n\n## NodeJS\n\nPackage can be install with `NPM` or `Yarn`\n\n```\nnode npm i -f\nnode yarn --production=false\n\n```\n\nFor serve application with npm:\n\n```\nexport PORT=3008 \u0026\u0026 export HOST=0.0.0.0 \u0026\u0026 node npm run start\n```\n\nDefault value for `PORT` is `3008` and `HOST` is `0.0.0.0`.\n\n`env` variable `HOST` and `PORT` used for serving the application.\n\nWe pass `0.0.0.0` to HOST to expose application to outside of container. and serving with `PORT` in inside and outside of container.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjafaripur%2Flocal-backend-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjafaripur%2Flocal-backend-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjafaripur%2Flocal-backend-dev/lists"}