{"id":23709408,"url":"https://github.com/dragomano/smf-docker","last_synced_at":"2026-05-01T17:35:28.895Z","repository":{"id":74090059,"uuid":"472420574","full_name":"dragomano/SMF-Docker","owner":"dragomano","description":"Docker compose files for SMF with MySQL/MariaDB/PostgreSQL","archived":false,"fork":false,"pushed_at":"2024-04-10T06:02:22.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-30T18:07:22.605Z","etag":null,"topics":["docker-compose","docker-image","smf","smf-apache","smf-nginx"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dragomano.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-03-21T16:25:16.000Z","updated_at":"2024-07-25T20:03:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"bca48135-dbdc-4344-b5d1-592143ff56fd","html_url":"https://github.com/dragomano/SMF-Docker","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/dragomano%2FSMF-Docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragomano%2FSMF-Docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragomano%2FSMF-Docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragomano%2FSMF-Docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dragomano","download_url":"https://codeload.github.com/dragomano/SMF-Docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239793054,"owners_count":19697893,"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":["docker-compose","docker-image","smf","smf-apache","smf-nginx"],"created_at":"2024-12-30T18:07:27.605Z","updated_at":"2026-05-01T17:35:28.877Z","avatar_url":"https://github.com/dragomano.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SMF Docker\n\nSo, there are some great Docker images like [WordPress](https://hub.docker.com/_/wordpress).\n\nWhy not make a similar solution for SMF? Let's try :)\n\nThis is a Docker image for testing the latest stable version of SMF.\n\n## Requirements\n\n- Docker Desktop\n- Docker Compose\n\n## Environments\n\nSee `.env` file.\n\n## How to change PHP version\n\n- Change `PHP_VERSION` in `.env` file\n- Run `docker compose build php-fpm`\n- Run `docker compose down`\n- Run `docker compose up -d`\n\n## How to run and stop\n\n### Apache (default)\n\n```sh\ndocker compose up -d\n```\n\n```sh\ndocker compose down\n```\n\n### Nginx\n\n```sh\ndocker compose -f nginx.yaml up -d\n```\n\n```sh\ndocker compose -f nginx.yaml down\n```\n\n## Hosts within your environment\n\nUse the following information to install/configure your SMF:\n\n| Service   | Hostname  | Port number     |\n| --------- | --------- | --------------- |\n| MySQL     | mysql     | 3306 (default)  |\n| MariaDB   | mariadb   | 3306 (default)  |\n| Postgres  | postgres  | 5432 (default)  |\n| Memcached | memcached | 11211 (default) |\n| Redis     | redis     | 6379 (default)  |\n| FTP       | localhost | 21 (default)    |\n\nLogin/pass by default - `user/pass`.\n\n## Persisting your application\n\nIf you remove the container, all your data will be lost, and the next time you run the image the database will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.\n\nFor persistence you should mount a directory at the `/app` path. If the mounted directory is empty, it will be initialized on the first run. Additionally you should mount a volume for persistence of the MariaDB or PostgreSQL data.\n\nTo avoid inadvertent removal of volumes, you can mount host directories as data volumes. Alternatively you can make use of volume plugins to host the volume data.\n\n## Backup databases\n\n### MySQL/MariaDB:\n\nExport:\n\n```sh\ndocker exec mariadb sh -c 'exec mysqldump \"$MYSQL_DATABASE\" -u\"$MYSQL_USER\" -p\"$MYSQL_PASSWORD\"' \u003e mysql_databases.sql\n```\n\nImport:\n\n```sh\ndocker exec -i mariadb sh -c 'exec mysql \"$MYSQL_DATABASE\" -u\"$MYSQL_USER\" -p\"$MYSQL_PASSWORD\"' \u003c mysql_databases.sql\n```\n\n### PostgreSQL\n\nExport:\n\n```sh\ndocker exec postgres sh -c 'exec pg_dump \"$POSTGRES_DB\" -U \"$POSTGRES_USER\"' \u003e pgsql_databases.sql\n```\n\nImport:\n\n```sh\ndocker exec postgres sh -c 'exec psql \"$POSTGRES_DB\" -U \"$POSTGRES_USER\"' \u003c pgsql_databases.sql\n```\n\n## Xdebug 3\n\nTo install **xdebug** extension just add this line in `php-fpm/Dockerfile`:\n\n```diff\n        php${PHP_VERSION}-redis \\\n+       php${PHP_VERSION}-xdebug; \\\n```\n\nTo configure **Xdebug 3** you need add these lines in `php-fpm/php-ini-overrides.ini`:\n\n### For Linux:\n\n```ini\nxdebug.mode = debug\nxdebug.remote_connect_back = true\nxdebug.start_with_request = yes\n```\n\n### For MacOS and Windows:\n\n```ini\nxdebug.mode = debug\nxdebug.remote_host = host.docker.internal\nxdebug.start_with_request = yes\n```\n\n## Add the section “environment” to the php-fpm service in `compose.yaml`:\n\n```\nenvironment:\n  PHP_IDE_CONFIG: \"serverName=Docker\"\n```\n\n### Create a server configuration in PHPStorm:\n\n- In PHPStorm open Preferences | Languages \u0026 Frameworks | PHP | Servers\n- Add a new server\n- The “Name” field should be the same as the parameter “serverName” value in “environment” in _compose.yaml_ (i.e. _Docker_ in the example above)\n- A value of the \"port\" field should be the same as first port(before a colon) in \"webserver\" service in _compose.yaml_\n- Select \"Use path mappings\" and set mappings between a path to your project on a host system and the Docker container.\n- Finally, add “Xdebug helper” extension in your browser, set breakpoints and start debugging\n\n## Do you want to know more about Docker?\n\nSee [Docker for local web development, introduction: why should you care?](https://tech.osteel.me/posts/docker-for-local-web-development-introduction-why-should-you-care)\n\n## Alternatives\n\nIf this solution seems too complicated for you, try [Laradock](https://laradock.io/getting-started/#installation).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragomano%2Fsmf-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdragomano%2Fsmf-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragomano%2Fsmf-docker/lists"}