Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidetriso/docker-shopware
Run Shopware in Docker container
https://github.com/davidetriso/docker-shopware
containers docker php shopware shopware6 symfony
Last synced: 3 days ago
JSON representation
Run Shopware in Docker container
- Host: GitHub
- URL: https://github.com/davidetriso/docker-shopware
- Owner: DavideTriso
- Created: 2023-02-04T07:06:13.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T12:35:01.000Z (6 months ago)
- Last Synced: 2024-11-10T21:05:09.973Z (2 months ago)
- Topics: containers, docker, php, shopware, shopware6, symfony
- Language: Dockerfile
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Shopware
Image to run Shopware 6 apps in a docker container
## Quick reference
### Build the image:
```
docker build -t davidetriso/shopware:[tagname-dir_name] ./[tagname-dir_name]
```E.g.:
```
docker build -t davidetriso/shopware:php-8.1-fpm ./php-8.1-fpm
```### Push image to Docker Hub
```
docker push davidetriso/shopware:tagname
```E.g.:
```
docker push davidetriso/shopware:php-8.1-fpm
```### Build and push everything
Execute the `./build-and-push.sh` script to build and push all images to Docker Hub at once.
## How to use
Bind-mount the root directory of your Shopware 6 project in the container's working directory (`/var/www/html`).
Uploaded media are stored by Shopware in the `public/media` folder, so it is necessary to mount a volume at this directory too.
For example, in a compose file add:
```yaml
shopware:
# ... other settings here ...
volumes:
- ./:/var/www/html/:rw
- media:/var/www/html/public/media:rwvolumes:
media:
```The image uses the default production-optimized `php.ini` file shipped in the `php` docker image and some settings are overridden by the `100-shopware-requirements-php.ini` file to meet Shopware 6 minimum requirements.
To customize the PHP settings to your needs it is sufficient to bind-mount a custom `ini` file in the container's `/usr/local/etc/php/conf.d/` directory.
E.g.:
```yaml
shopware:
# ... other settings here ...
volumes:
# ... other volumes and mounts here ...
- ./my/custom/999-php.ini:/usr/local/etc/php/conf.d/999-php.ini:ro
```### Debugging
The `XDebug` extension is available in the image, but is disabled by default. To enable it, use a custom `ini` file, like explained above.