Should be easy-breazy, right? Never!
I started with high hopes when getting Shopware 6 up and running locally with Dockware play-image was as easy as making a cup of coffee. What I soon realized though was that I was terribly wrong.
I was trying to install Shopware 126.96.36.199 on Dockware Essentials image.
If you are just looking for an quick answer, here comes: Shopware 188.8.131.52 does not work with Essentials -image. Use something else like 184.108.40.206 for example.
I did not try this with earlier 6.5 releases.
Php bin/console system:install does not make database migrations
$php bin/console system:install <options> should make the database migrations (build the database) but with 220.127.116.11 it did not do that. If I understand right, the
migrate Migrations __ <1 sec 40,5MiB referes to the size of migration to make. However for the unknown reason it did not.
As seen from the image above, the errors clearly states what is wrong - The database is not what it should be.
Working installation process
This is how I got Shopware 18.104.22.168 installed with Dockware Essentials image:
- Start the image using docker compose up -d in a folder where your docker-compose.yml is located (see mine below)
- Get into the container
- Navigate to
- Download 22.214.171.124 from here using wget for example.
- Unzip the folder (so that the files are placed to the root of
php bin/console system:setupand fill in asked questions. Credentials are root/root
- Run `php bin/console system:install --create-database <other options>`
version: "3" services: shopware: environment: - PHP_VERSION=8.1 - NODE_VERSION=18.18.0 image: dockware/essentials:latest container_name: shopware ports: - "8888:80" volumes: - ./html:/var/www/html - db_volume:/var/lib/mysql networks: - web volumes: html: name: html db_volume: driver: local networks: web: external: false
After this, you are not ready though. You can go into adminer (localhost:8080/adminer.php) for example, but for example admin will not work. Yet.
Installing admin and other assets
I was a bit suprised when I noticed that the install process did not actually install the frontend stuff. To get into Shopware admin, you need to run two more commands:
- Install & build frontend scripts
- Create admin user
Install & build frontend stuff
Its a bit weird that this was not documented anywhere:
composer setup command. This builds all the frontend assets into
Create admin user
Admin user needs to be created to access the Shopware 6 admin. Luckily, this is very easy to do by running yet another command:
php bin/console user:create -a -p <your password> --firstName <your firstname> --lastName <your lastname> --email <your email> <username>
Tips, tricks and thoughts
- I think all of this could be done using the .phar installer. I tried it once while figuring all this out but it did not work so I kept on the manual path.
- Make sure to mount database volume in docker-compose.yml to persist the data. If you don't do that, database has to be created again on the next run. See: https://docs.dockware.io/tips-and-tricks/persisting-data
- I got very frustrated trying to figure this all out as the documentation lacked many key points and how the current latest Shopware 6 version was not compatible with the Essentials image.
I wrote an issue to Dockware github: https://github.com/dockware/dockware/issues/195