dockware/contribute

By dockware

Updated almost 3 years ago

Managed Shopware 6 Docker setups with dockware

Image
1

5.7K

dockware #contribute

!

Quick reference

Where to get help: https://www.dockware.io

Where to file issues: https://www.dockware.io

Documentation: https://dockware.io/docs

Maintained by: dasistweb GmbH (https://www.dasistweb.de)

More about Shopware: https://www.shopware.com

Shopware Platform on Github: https://github.com/shopware/platform

What is dockware/contribute?

dockware is a managed Shopware 6 docker image.

Run and explore any Shopware 6 version within minutes locally in docker. No more hassle and blazing fast!

With dockware it's easy to explore Shopware and start developing in a smooth and seamless environment!

How to use this image

Quick Start

If you want to start the image and give it a try, simply use the following command.

Use the tag latest to get your dockware contribution. Please note you have to pull the repository to get the daily updates of Shopware.

You can also switch to another PHP version by providing the ENV variable.

# quick run with latest PHP and Shopware
$ docker run --rm -p 80:80 dockware/contribute:latest

# use another php version
$ docker run --rm -p 80:80 --env PHP_VERSION=7.2 dockware/contribute:latest

Please be aware that any modifications you make while Shopware is running, will be lost when stopping and restarting the container. This is really for easy plug and play tests.

If you want to keep your data, please read the information about persisting containers in this README.

Environment Variables

This image comes with different features that can be set with the ENV variables.

FeatureDefaultDescription
PHP_VERSION7.4Switch to any of the installed PHP versions: 7.4, 7.3, 7.2,
APACHE_DOCROOT/var/www/html/publicSets the default DocRoot of Apache
SSH_USERnot-setName of the optional new SSH user that replaces the existing one from dockware
SSH_PWDnot-setPassword of the optional new SSH user that replaces the existing one from dockware
MYSQL_USERnot-setOptional variable to create a separate MySQL user. This is the name of the user.
MYSQL_PWDnot-setOptional variable to create a separate MySQL user. This is the password of the user.
XDEBUG_ENABLED0Enable or disable XDebug with either 1 or 0 as value.
XDEBUG_REMOTE_HOSThost.docker.internalUse default value for MAC + Windows, and 172.17.0.1 for Linux
XDEBUG_CONFIGidekey=PHPSTORMIDE Key identifier for XDebug
PHP_IDE_CONFIGserverName=localhostused for the serverName export for XDebug usage on CLI
TIDEWAYS_KEYnot-setAPI Key of the Tideways project
TIDEWAYS_ENVdevOptional identifier of the environment
TIDEWAYS_SERVICEwebOptional identifier of the service
FILEBEAT_ENABLED0Activates the Filebeat daemon service (value 1). For this please provide a manual filebeat.yml for the container. You can do this with bind-mounting.
SW_CURRENCYnot-setSwitch to a different default currency for the system, like GBP. This will be used in the administration.
Container Access

You can access the container either by using the docker exec command, or by using a ssh command. If you want to access your container using SSH please make sure to expose port 22 (see docker-compose template below).

# docker command
$ docker exec -it shopware bash

# ssh command with custom port
$ ssh dockware@localhost -p 22

Please use the following credentials for SSH or SFTP:

user: dockware
password: dockware
Remote Path: /var/www/html

Persistent data

The easy first run is perfect to immediately start Shopware, but does not persist any data or allows you to reuse that Shopware 6 instance again after restarting your host. If you want to persist any data or changes you made, please create a volume and map these 2 folders to persist the database and the DocRoot of Shopware.

  • /var/lib/mysql
  • /var/www/html

Docker Compose Template

This is a full template with everything that can be done using dockware. Please note that not all of these settings might be necessary.

dockware:
    image: dockware/contribute:latest
    container_name: shopware
    ports:
        - "80:80"
        - "22:22"
        # Admin Watcher Port
        - "8888:8888"
        # Storefront Watcher Port
        - "9999:9999"
    environment:
        - PHP_VERSION=7.4
        - XDEBUG_ENABLED=1
        - SW_CURRENCY=GBP  

Configuration Options

Custom SSH User

It's possible to create a separate SSH access that replaces the one that comes out of the box with dockware. For this, please provide the corresponding environment variables. This will lead to an automatically created new SSH user when the docker container is launched.

dockware:
  image: dockware/contribute:latest
  environment:
    - SSH_USER=userABC
    - SSH_PWD=supersecret
Tideways Integration

Dockware comes with an installed Tideways agent. You can enable this optional integration by simply providing your API key as environment variable. In additional to this, you can add additional settings like the Tideways Service and Environment identifiers. Please keep in mind, that these settings might not be working for all Tideways packages (see Tideways for more).

dockware:
  image: dockware/contribute:latest
  environment:
    - TIDEWAYS_KEY=xxx
    - TIDEWAYS_ENV=dev
    - TIDEWAYS_SERVICE=myshop
Filebeat Integration

The Filebeat integration allows you to automatically send log data and files to your Logstash instance if you use an ELK stack.

Please keep in mind, if Filebeat is enabled, you need a configured filebeat.yml file that is injected using bind-mounting. In addition to this, your Docker container must have access to your logstash container by either using the links or networks in Docker. This needs to be done only if you also have your Logstash within your Docker network :)

dockware:
  image: dockware/contribute:latest
  volumes:
    - ./elk/myservice/filebeat.yml:/etc/filebeat/filebeat.yml
  environment:
    - FILEBEAT_ENABLED=1

License

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Docker Pull Command

docker pull dockware/contribute