{"id":19884310,"url":"https://github.com/yurigauermarques/ambiente-php","last_synced_at":"2026-04-13T03:01:45.879Z","repository":{"id":43058623,"uuid":"284816879","full_name":"yurigauermarques/ambiente-php","owner":"yurigauermarques","description":"O objetivo deste repositório é ter um ambiente pré-configurado para facilitar os estudos de ferramentas desenvolvidas em PHP.","archived":false,"fork":false,"pushed_at":"2022-09-30T20:09:44.000Z","size":126,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T18:37:17.930Z","etag":null,"topics":["composer","docker","docker-compose","mysql","nginx","php","php7"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yurigauermarques.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-03T22:06:32.000Z","updated_at":"2024-03-31T22:29:03.000Z","dependencies_parsed_at":"2023-01-18T15:16:03.134Z","dependency_job_id":null,"html_url":"https://github.com/yurigauermarques/ambiente-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurigauermarques%2Fambiente-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurigauermarques%2Fambiente-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurigauermarques%2Fambiente-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurigauermarques%2Fambiente-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yurigauermarques","download_url":"https://codeload.github.com/yurigauermarques/ambiente-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241313189,"owners_count":19942416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["composer","docker","docker-compose","mysql","nginx","php","php7"],"created_at":"2024-11-12T17:26:14.209Z","updated_at":"2026-04-13T03:01:45.825Z","avatar_url":"https://github.com/yurigauermarques.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Requisito\n  - necessário ter o [docker](https://docs.docker.com/engine/install/) e o [docker-compose](https://docs.docker.com/compose/install/) instalados;\n\n## Conteúdo\n  - Aplicação Symfony 3.4 para servir de exemplo na instalação\n  - Configuração de docker-compose com\n    - [PHP7](https://pt.wikipedia.org/wiki/PHP)\n        - [php:7.4-fpm](https://hub.docker.com/_/php)\n        - pdo_mysql\n    - [Nginx](https://pt.wikipedia.org/wiki/Nginx)\n        - [nginx:1.19.1](https://hub.docker.com/_/nginx)\n        - conf.d/app.conf para exemplo\n    - [MySQL](https://pt.wikipedia.org/wiki/MySQL)\n        - [mysql:8](https://hub.docker.com/_/mysql)\n        - Inicia o banco com um `.sql`\n\n    - [Composer](https://getcomposer.org)\n        - [composer:1](https://hub.docker.com/_/composer)\n        - Configurado para instalar as dependencias da App de exemplo\n\n\n## Instalação Aplicação\n  - Codigo Fonte\n    ```bash\n    cd /var/www/;\n    git clone https://github.com/yurigauermarques/AmbientePHP.git;\n    ```\n  - Configuração de host\n    - editar o `hosts`\n    - adicione o conteudo no final\n      ```bash\n      127.0.0.1 app-docker.localhost\n      ```\n\n## Inicializar os containers\n  - Subir o serviço\n      ```bash\n      docker-compose up -d --build\n      ```\n  - Derrubar o serviço\n      ```bash\n      docker-compose down\n      ```\n  - Se der erro para olhar os logs\n      ```bash\n      docker-compose logs;\n      docker-compose logs nomecontainer;\n      ```\n\n\n## Pendencias\n  - php.ini\n  - yarn\n  - Modsecurity\n    - [Dockerhub](https://hub.docker.com/r/owasp/modsecurity)\n    - [Dockerfile com a V3](https://github.com/coreruleset/modsecurity-docker/blob/master/v3-nginx/Dockerfile)\n  - Traefik\n    -[Docker - Traefik](https://docs.traefik.io/v1.7/configuration/backends/docker)\n    -[Documentação do Traefik](https://docs.traefik.io/v1.7/#1-launch-traefik-tell-it-to-listen-to-docker)\n\n\n## Exemplos de como utilizar o Composer\n- Instalar um Projeto `Symfony 3.4` com `Composer`\n  - No Windows\n    ```bash\n    docker run --rm --interactive --tty --volume  C:\\Projetos\\AmbientePHP\\:/app composer create-project symfony/framework-standard-edition my_project_name;\n    ```\n  - No Linux\n    ```bash\n    docker run --rm --interactive --tty --volume  /var/www/AmbientePHP/:/app composer create-project symfony/framework-standard-edition my_project_name;\n    ```\n- Executar comandos úteis do `Composer`\n    ```bash\n    docker-compose run --rm composer install;\n    docker-compose run --rm composer update;\n    ```\n\n## Exemplos úteis\n- Exemplo de como atribuir valores para *variáveis de ambiente* direto na linha de comando para substituir o `.env`:\n    ```bash\n    export MAILER_USER=TESTE;\n    export MYSQL_USER=userPrompt;\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurigauermarques%2Fambiente-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyurigauermarques%2Fambiente-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurigauermarques%2Fambiente-php/lists"}