{"id":20706464,"url":"https://github.com/alejandrososa/comics-store","last_synced_at":"2026-04-09T08:32:47.265Z","repository":{"id":96577011,"uuid":"117050158","full_name":"alejandrososa/comics-store","owner":"alejandrososa","description":"Comics Store with Docker Symfony 4, Angular 2 and DDD","archived":false,"fork":false,"pushed_at":"2018-01-12T15:35:09.000Z","size":263,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T20:24:18.611Z","etag":null,"topics":["angular","ddd-architecture","docker","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/alejandrososa.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":"2018-01-11T04:30:22.000Z","updated_at":"2018-04-02T03:30:33.000Z","dependencies_parsed_at":"2023-06-19T15:55:44.026Z","dependency_job_id":null,"html_url":"https://github.com/alejandrososa/comics-store","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/alejandrososa%2Fcomics-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrososa%2Fcomics-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrososa%2Fcomics-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrososa%2Fcomics-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alejandrososa","download_url":"https://codeload.github.com/alejandrososa/comics-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242974095,"owners_count":20215268,"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":["angular","ddd-architecture","docker","symfony"],"created_at":"2024-11-17T01:23:16.298Z","updated_at":"2026-04-09T08:32:42.220Z","avatar_url":"https://github.com/alejandrososa.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Symfony Angular Comics Store\n\nDocker symfony gives you everything you need for developing Symfony application. This complete stack run with docker and [docker-compose](https://docs.docker.com/compose/).\n\n## Installation fast\n\nFirst of all, the first thing you should do is configure the ip for the mysql database, edit the following file:\n\n    $ cp backend/.env.dist /backend/.env \u0026\u0026 nano backend/.env\n\nEdit with your ipaddress the following line:\n\n    DATABASE_URL=mysql://root:root@YOUR_IPADDRESS:3307/store\n\nNow execute the next command in your console:\n\n    $ sh deploy.sh\n    \nEnjoy :-)\n\n\n## Installation step by step\n\n1. Install [docker](https://docs.docker.com/compose/install/) and [docker-compose](https://docs.docker.com/compose/install/#install-compose)\n\n2. Build/run containers with (with and without detached mode)\n\n    ```bash\n    $ docker-compose build\n    $ docker-compose up -d\n    ```\n\n3. Update your system host file (add comics-store.com)\n\n    ```bash\n    # UNIX only: get containers IP address and update host (replace IP according to your configuration) (on Windows, edit C:\\Windows\\System32\\drivers\\etc\\hosts)\n    $ sudo echo $(docker network inspect bridge | grep Gateway | grep -o -E '[0-9\\.]+') \"comics-store.com api.comics-store.com\" \u003e\u003e /etc/hosts\n    ```\n\n    **Note:** For **OS X**, please take a look [here](https://docs.docker.com/docker-for-mac/networking/) and for **Windows** read [this](https://docs.docker.com/docker-for-windows/#/step-4-explore-the-application-and-run-examples) (4th step).\n\n4. Prepare Backend app\n\n    1. Go to backend directory\n    2. Update .env\n\n        ```\n        # .env\n        DATABASE_URL=mysql://root:root@db:3307/store\n        ```\n\n    3. Composer install \u0026 create database\n\n        ```bash\n        $ docker-compose exec store bash\n        $ composer install\n        # Symfony4\n        $ php bin/console doctrine:database:create\n        $ php bin/console doctrine:schema:update --force\n        $ php bin/console doctrine:fixtures:load --no-interaction\n        ```\n5. Prepare Frontend app\n    \n    1. Go to frontend directory \n    2. Install nvm \n        ```\n        curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash\n        ```\n    3. Install Angular cli\n        ```\n        npm install -g @angular/cli\n        ```\n    4. Install all libraries javascript \n        ```\n        npm install\n        ```\n    5. Compile the project\n        ```\n        ng build\n        ```\n\n6. Enjoy :-)\n\n* Visit [comics-store.com](http://comics-store.com)  \n\n\n## Usage\n\nJust run `docker-compose up -d`, then:\n\n* App: visit [comics-store.com](http://comics-store.com)  \n\n## How it works?\n\nHave a look at the `docker-compose.yml` file, here are the `docker-compose` built images:\n\n* `db`: This is the MySQL database container,\n* `store`: This is the PHP-FPM and Apache2 container in which the application volume is mounted,\n\nThis results in the following running containers:\n\n```bash\n$ docker-compose ps\n\n       Name                     Command               State              Ports            \n------------------------------------------------------------------------------------------\ncomic-store-apache   docker-php-entrypoint /bin ...   Up      5233/tcp, 0.0.0.0:80-\u003e80/tcp\ncomic-store-db       docker-entrypoint.sh mysqld      Up      0.0.0.0:3307-\u003e3306/tcp  \n```\n\n## Useful commands\n\n```bash\n# bash commands\n$ docker-compose exec store bash\n\n# Composer (e.g. composer update)\n$ docker-compose exec store composer update\n\n# Symfony commands\n$ docker-compose exec store /var/www/html/bin/console cache:clear # Symfony4\n$ docker-compose exec store bash\n$ php bin/console cache:clear\n\n# Retrieve an IP Address (here for the nginx container)\n$ docker inspect --format '{{ .NetworkSettings.Networks.dockersymfony_default.IPAddress }}' $(docker ps -f name=nginx -q)\n$ docker inspect $(docker ps -f name=store -q) | grep IPAddress\n\n# MySQL commands\n$ docker-compose exec db mysql -uroot -p\"root\"\n\n# F***ing cache/logs folder\n$ sudo chmod -R 777 var/cache var/log var/sessions # Symfony4\n\n# Check CPU consumption\n$ docker stats $(docker inspect -f \"{{ .Name }}\" $(docker ps -q))\n\n# Delete all containers\n$ docker rm $(docker ps -aq)\n\n# Delete all images\n$ docker rmi $(docker images -q)\n```\n\n## FAQ\n\n* Got this error: `ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?\nIf it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.` ?  \nRun `docker-compose up -d` instead.\n\n* Permission problem? See [this doc (Setting up Permission)](http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup)\n\n* How to config Xdebug?\nXdebug is configured out of the box!\nJust config your IDE to connect port  `9001` and id key `PHPSTORM`\n\n* Permission problem MySql?\n  sudo chmod -R 777 data/db","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandrososa%2Fcomics-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falejandrososa%2Fcomics-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandrososa%2Fcomics-store/lists"}