Skip to content

Commit fd8bfb2

Browse files
committed
Simplify docker setup
1 parent df62a6f commit fd8bfb2

File tree

5 files changed

+18
-101
lines changed

5 files changed

+18
-101
lines changed

Dockerfile

-53
This file was deleted.

README.md

+2-20
Original file line numberDiff line numberDiff line change
@@ -70,43 +70,25 @@ Change into the project directory, then start the docker containers, add the cac
7070
cd downtown
7171
```
7272

73-
```shell script
74-
docker-compose build
75-
```
76-
7773
```shell script
7874
docker-compose up -d
7975
```
8076

8177
```shell script
82-
docker-compose exec app_server sh
78+
docker-compose exec cli bash
8379
```
8480

8581
When inside the app container, do a basic install, generate a JWT secret and an App Secret, then exit the container:
8682

8783
```shell script
84+
bin/console system:setup
8885
bin/console system:install --create-database --basic-setup --force
8986
```
9087

91-
```shell script
92-
bin/console system:generate-jwt-secret --force
93-
```
94-
95-
```shell script
96-
bin/console system:generate-app-secret # put into docker-compose.yml
97-
```
98-
9988
```shell script
10089
exit
10190
```
10291

103-
The App Secret is only shown on screen, you have to put it manually into the `docker-compose.yml`, right after `- APP_SECRET=`.
104-
105-
Then regenerate the containers by re-executing up:
106-
107-
```shell script
108-
docker-compose up -d
109-
```
11092

11193
Please note:
11294

docker-compose.yml

+10-23
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,25 @@
1-
#override defaults for dev
21
version: "3.7"
32

43
services:
54
app_server:
6-
image: downtown:local
7-
build: .
5+
image: shyim/shopware-platform-nginx-production:php74
86
depends_on:
97
- mysql
108
ports:
11-
- 8000:8000
12-
- 8005:8000
13-
environment:
14-
# define yourself
15-
- DATABASE_URL=mysql://downtown:uptown@mysql:3306/downtown
16-
- APP_URL=http://localhost:8000
17-
- APP_SECRET=
18-
- INSTANCE_ID=
9+
- 80:80
10+
volumes:
11+
- ".:/var/www/html"
12+
13+
cli:
14+
image: shyim/shopware-cli:php74
15+
tty: true
1916
volumes:
20-
- "./config/jwt:/sw6/config/jwt"
21-
- "./custom:/sw6/custom"
22-
- "./public/bundles:/sw6/public/bundles"
23-
- "./public/media:/sw6/public/media"
24-
- "./public/sitemap:/sw6/public/sitemap"
25-
- "./public/theme:/sw6/public/theme"
26-
- "./public/thumbnail:/sw6/public/thumbnail"
27-
- "./var:/sw6/var"
28-
- "./src:/sw6/src"
17+
- ".:/var/www/html"
2918

3019
mysql:
3120
image: mysql:5.7
32-
tmpfs:
33-
- /var/lib/mysql:uid=999,gid=999
3421
environment:
3522
- MYSQL_ROOT_PASSWORD=root
3623
- MYSQL_DATABASE=downtown
3724
- MYSQL_USER=downtown
38-
- MYSQL_PASSWORD=uptown
25+
- MYSQL_PASSWORD=uptown

makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ help:
1212
# ------------------------------------------------------------------------------------------------------------
1313

1414
setup: ## Installs Downtown
15-
docker-compose build
1615
docker-compose up -d
17-
docker-compose exec app_server sh -c 'bin/console system:install --create-database --basic-setup --force'
18-
docker-compose exec app_server sh -c 'bin/console system:generate-jwt-secret --force'
19-
docker-compose exec app_server sh -c 'bin/console system:generate-app-secret'
16+
docker-compose exec cli sh -c 'composer install'
17+
docker-compose exec cli sh -c 'bin/console system:setup'
18+
docker-compose exec cli sh -c 'bin/console system:install --create-database --basic-setup --force'
19+
docker-compose exec cli sh -c 'bin/console system:generate-jwt-secret --force'
20+
docker-compose exec cli sh -c 'bin/console system:generate-app-secret'
2021

2122
merchant: ## Runs the merchant portal
2223
cd src/MerchantFrontend npm install && npm run start

src/Voucher/Migration/Migration1586509275AlterVoucherUniqueConstraint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function update(Connection $connection): void
1616
{
1717
$sql = <<<SQL
1818
ALTER TABLE `sold_voucher`
19-
DROP INDEX `uniq.merchant_id__code`;
19+
DROP INDEX `sold_voucher`;
2020
2121
ALTER TABLE `sold_voucher`
2222
ADD UNIQUE KEY `uniq.order_line_item__code` (`order_line_item_id`,`code`);

0 commit comments

Comments
 (0)