{"id":17274092,"url":"https://github.com/davidthorn/symfony","last_synced_at":"2026-04-10T17:07:52.944Z","repository":{"id":47014237,"uuid":"374318002","full_name":"davidthorn/symfony","owner":"davidthorn","description":"This repository contains all services required to run a symfony application using docker.","archived":false,"fork":false,"pushed_at":"2023-09-12T09:56:54.000Z","size":629,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T14:47:37.303Z","etag":null,"topics":["development","docker","docker-compose","mysql","php","symfomy"],"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/davidthorn.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}},"created_at":"2021-06-06T09:23:11.000Z","updated_at":"2023-09-12T09:56:58.000Z","dependencies_parsed_at":"2022-09-02T22:33:12.200Z","dependency_job_id":null,"html_url":"https://github.com/davidthorn/symfony","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/davidthorn%2Fsymfony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidthorn%2Fsymfony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidthorn%2Fsymfony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidthorn%2Fsymfony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidthorn","download_url":"https://codeload.github.com/davidthorn/symfony/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245661440,"owners_count":20651863,"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":["development","docker","docker-compose","mysql","php","symfomy"],"created_at":"2024-10-15T08:53:05.805Z","updated_at":"2025-12-30T23:24:57.459Z","avatar_url":"https://github.com/davidthorn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Symfony Skeleton - Docker\n\n\u003e THIS README IS OUTDATED AND I NEED TO UPDATE IT\n\nThe build,install scripts install a [symfony/website-skeleton](https://github.com/symfony/website-skeleton) application into the app folder and then install some custom packages that can be used to create a website/api.\n\nThe symfony project will be serve its website pages, using nginx, and also save all of its data into a mysql server. \n\nAll of these services are run using docker and all configured using the [docker-compose.yml](./docker-compose.yml) within in the root directory of the project.\n\n\n## Destroy Step\n\nIf this is the first time that you have run this script and on this machine, then the [destroy.sh](./destroy.sh) script is not really required.\n\nThe script is there to make sure that all resources are removed that could cause the build phase a problem.\n\nIf the script has been ran before, then it will remove all volumes, containers and images that have been created and services started for this folder.\n\nBe warned, if you make changes to the [Dockerfile](./build/Dockerfile) and have built it prior to making the changes, docker my have some volume problems when creating the php container.\n\nIf files and folders do not exist in the php container, then restarting docker seems to fix the problem. Its definitely not the solution, but it helps to fix the issue.\n\n## Build Step\n\nIn order for the application to run, the symfony service requires for its image to be built.\n\nThe reason for this step is to make sure that we do not encounter any file permission problems during the installation step.\n\nRun the following command in the route directory of this project so that the php image can be built.\n```bash\n./build.sh\n```\n\nThe build script does nothing more than tell docker which Dockerfile to use\nand also it sets a `--build-arg` to `USER_ID=$(id -u)` that is required within the dockerfile.\n\nBy setting this `--build-arg` it informs the [Dockerfile](./build/Dockerfile), which user id is used as the owner and group for all files in the working directory and also which user will be used to execute all commands.\n\nThe command also informs docker that it must rebuild the image and also pull the newest image tag from docker hub.\n\n```bash\nsudo docker-compose -f docker-compose.yml build --force-rm --pull --build-arg USER_ID=$(id -u)\n```\n\n## Installation\n\nOnce the build step has been completed, the [`install.sh`](./install.sh) script can be executed.\n\nBe aware that the install.sh script will create a [.install.lock](./build/.install.lock) file within the [build](./build) folder upon a successful installation.\n\nThe lock file, protects the [build.sh](./build.sh) from deleting any work that has been carried out in the app folder.\n\n## Security\n\nPrior to starting developing the project, some work is required to secure the environment variables used within the project.\n\nIf the [install.sh](./install.sh) script has been run, then you would have entered the user, password, database name in for the `dev` environment.\n\nThese values are stored within the [app/config/secrets](./app/config/secrets) folder.\n\nIn order for these values to be used, the [doctrine.yaml](./app/config/packages/doctrine.yaml) needs to be updated:\n\nThe [doctrine.yaml](./app/config/packages/doctrine.yaml) will probably look like this:\n\n```yaml\ndoctrine:\n    dbal:\n        url: '%env(resolve:DATABASE_URL)%'\n\n        # IMPORTANT: You MUST configure your server version,\n        # either here or in the DATABASE_URL env var (see .env file)\n        #server_version: '13'\n```\n\nReplace the `doctrine` property with the code below:\n\n```yaml\ndoctrine:\n    dbal:\n        dbname: '%env(DATABASE_NAME)%'\n        host: mysql\n        port: 3306\n        user: '%env(DATABASE_USER)%'\n        password: '%env(DATABASE_PASSWORD)%'\n        driver: pdo_mysql\n        server_version: '5.7'\n        charset: UTF8\n```\n\nNext remove all `doctrine` information from the [app/.env](./app/.env) file.\nOr at least comment out all uncommented lines.\n\n```bash\n###\u003e doctrine/doctrine-bundle ###\n# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url\n# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml\n#\n# DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"\n# DATABASE_URL=\"mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7\"\nDATABASE_URL=\"postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=13\u0026charset=utf8\"\n###\u003c doctrine/doctrine-bundle ###\n```\n\n## Extract APP_SECRET from .env to secrets.\n\nRun the following command to extract the APP_SECRET to a secrets files.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidthorn%2Fsymfony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidthorn%2Fsymfony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidthorn%2Fsymfony/lists"}