Download the PHP package shopware/docker without Composer

On this page you can find all versions of the php package shopware/docker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package docker

Shopware 6 Production Docker

This repository contains a base image with Alpine + PHP + Caddy to build your own docker image with your code.

Getting Started

Create a Dockerfile in your project like:

or better run composer req shopware/docker to install the Symfony Recipe.

In the stage build we are using shopware-cli to build the Shopware files:

Refer to shopware-cli to learn more about shopware-cli project ci

Building docker image

You build your individual docker image with the source code in your CI pipeline and push it to your Container Registry. Later on can you use this image inside example docker-compose / kubernetes / etc.

Example Github Action to build the image

Running the container

Example docker-compose

In your setup you should have always an "init" container which does basic stuff like extension updates, theme compile etc with entrypoint /setup. When this container exits, you can start your actual app / worker containers. See docker-compose example above for details.

Environment variables

Variable Default Value Description
APP_ENV prod Environment
APP_SECRET (empty) Can be generated with openssl rand -hex 32
INSTANCE_ID (empty) Unique Identifier for the Store: Can be generated with openssl rand -hex 32
JWT_PRIVATE_KEY (empty) Can be generated with shopware-cli project generate-jwt --env
JWT_PUBLIC_KEY (empty) Can be generated with shopware-cli project generate-jwt --env
LOCK_DSN flock DSN for Symfony locking
APP_URL (empty) Where Shopware will be accessible
DATABASE_HOST (empty) Host of MySQL (needed for for checking is MySQL alive)
DATABASE_PORT 3306 Host of MySQL (needed for for checking is MySQL alive)
BLUE_GREEN_DEPLOYMENT 0 This needs super priviledge to create trigger
DATABASE_URL (empty) MySQL credentials as DSN
DATABASE_SSL_CA (empty) Path to SSL CA file (needs to be readable for uid 512)
DATABASE_SSL_CERT (empty) Path to SSL Cert file (needs to be readable for uid 512)
DATABASE_SSL_KEY (empty) Path to SSL Key file (needs to be readable for uid 512)
DATABASE_SSL_DONT_VERIFY_SERVER_CERT (empty) Disables verification of the server certificate (1 disables it)
MAILER_DSN null://localhost Mailer DSN (Admin Configuration overwrites this)
OPENSEARCH_URL (empty) OpenSearch Hosts
SHOPWARE_ES_ENABLED 0 OpenSearch Support Enabled?
SHOPWARE_ES_INDEXING_ENABLED 0 OpenSearch Indexing Enabled?
SHOPWARE_ES_INDEX_PREFIX (empty) OpenSearch Index Prefix
COMPOSER_HOME /tmp/composer Caching for the Plugin Manager
SHOPWARE_HTTP_CACHE_ENABLED 1 Is HTTP Cache enabled?
SHOPWARE_HTTP_DEFAULT_TTL 7200 Default TTL for Http Cache
MESSENGER_TRANSPORT_DSN (empty) DSN for default async queue (example: amqp://guest:guest@localhost:5672/%2f/default
MESSENGER_TRANSPORT_LOW_PRIORITY_DSN (empty) DSN for low priority queue (example: amqp://guest:guest@localhost:5672/%2f/low_prio
MESSENGER_TRANSPORT_FAILURE_DSN (empty) DSN for failed messages queue (example: amqp://guest:guest@localhost:5672/%2f/failure
INSTALL_LOCALE en-GB Default locale for the Shop
INSTALL_CURRENCY EUR Default currency for the Shop
INSTALL_ADMIN_USERNAME admin Default admin username
INSTALL_ADMIN_PASSWORD shopware Default admin password
PHP_SESSION_COOKIE_LIFETIME 0 See PHP FPM documentation
PHP_SESSION_GC_MAXLIFETIME 1440 See PHP FPM documentation
PHP_SESSION_HANDLER files Set to redis for redis session
PHP_SESSION_SAVE_PATH (empty) Set to tcp://redis:6379 for redis session
PHP_MAX_UPLOAD_SIZE 128m See PHP documentation
PHP_MAX_EXECUTION_TIME 300 See PHP documentation
PHP_MEMORY_LIMIT 512m See PHP documentation
FPM_PM dynamic See PHP FPM documentation
FPM_PM_MAX_CHILDREN 5 See PHP FPM documentation
FPM_PM_START_SERVERS 2 See PHP FPM documentation
FPM_PM_MIN_SPARE_SERVERS 1 See PHP FPM documentation
FPM_PM_MAX_SPARE_SERVERS 3 See PHP FPM documentation

Volumes

In a very basic setup when all files are stored locally you need 5 volumes:

Usage Path
invoices/private files /var/www/html/files
theme files /var/www/html/public/theme
images /var/www/html/public/media
image thumbnails /var/www/html/public/thumbnail
generated sitemap /var/www/html/public/sitemap

It is recommanded to use an external storage provider when possible to store the files. With an external storage provider you won't need any mounts. Refer to official Shopware docs for setup.

FAQ

Use Redis for sessions You can set `PHP_SESSION_HANDLER` to `redis` and `PHP_SESSION_SAVE_PATH` to any redis path like `tcp://redis:6379`

Known issues

Assets are stored locally, but asset-manifest.json tries to write to external location Override the filesystem of asset-manifest.json to temporary filesystem:

All versions of docker with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shopware/docker contains the following files

Loading the files please wait ....