Skip to content

Commit 3229d26

Browse files
committed
Changes related to #66
1 parent a619d02 commit 3229d26

File tree

4 files changed

+53
-16
lines changed

4 files changed

+53
-16
lines changed

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,38 @@ $ make VERSION=1.0.0 package
4040

4141
## Development Environment
4242

43-
Run `make dev-create` to create a docker development environment using the [magento-cloud-docker](https://github.com/magento/magento-cloud-docker) project. Run `make dev-down` spin the environment down, `make dev-up` to spin it back up, and `make dev-nuke` to completely remove everything that is ephemeral.
43+
We use a super simple development environment that is ephemeral. You can spin it up by doing the following:
44+
45+
```shell
46+
mkdir -p ./private/varnish
47+
cp conf/varnish/*.vcl ./private/varnish
48+
docker compose up -d
49+
docker compose logs -f
50+
docker compose down # destroy environment
51+
```
52+
53+
You can deploy the module into the development environment by running the following:
54+
55+
```shell
56+
make clean
57+
make build
58+
make deploy
59+
```
60+
61+
You can then access the magento container by running the following:
62+
63+
```shell
64+
docker compose exec magento bash
65+
```
66+
67+
Once in the container you can run the standard commands to install the module:
68+
69+
```shell
70+
magento setup:upgrade
71+
magento setup:di:compile
72+
```
73+
74+
The Magento site is hosted on http://localhost and the backend can be reached at http://localhost/admin. Default user name is `jetrails` and default password is `magento2`.
4475

4576
## Legal Disclaimer
4677

conf/varnish/default.custom.vcl

Whitespace-only changes.

conf/varnish/default.vcl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
vcl 4.1;
2+
3+
backend default {
4+
.host = "magento";
5+
.port = "8080";
6+
}

docker-compose.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
version: "2"
22

33
services:
4-
varnish:
5-
image: varnish:6
6-
environment:
7-
- VARNISH_HTTP_PORT=8080
8-
- VARNISH_SIZE=1G
9-
volumes:
10-
- ./private/default.vcl:/etc/varnish/default.vcl
114
elasticsearch:
125
image: docker.io/bitnami/elasticsearch:7
136
mariadb:
@@ -18,9 +11,6 @@ services:
1811
- MARIADB_DATABASE=magento2
1912
magento:
2013
image: docker.io/bitnami/magento:2
21-
ports:
22-
- "80:8080"
23-
- "443:8443"
2414
environment:
2515
- MAGENTO_HOST=localhost
2616
- MAGENTO_DATABASE_HOST=mariadb
@@ -30,17 +20,27 @@ services:
3020
- MAGENTO_USERNAME=jetrails
3121
- MAGENTO_PASSWORD=magento2
3222
- MAGENTO_MODE=developer
33-
- MAGENTO_ENABLE_HTTPS=yes
34-
- MAGENTO_ENABLE_ADMIN_HTTPS=yes
23+
- MAGENTO_ENABLE_HTTPS=no
24+
- MAGENTO_ENABLE_ADMIN_HTTPS=no
3525
- MAGENTO_ADMIN_URL_PREFIX=admin
3626
- ELASTICSEARCH_HOST=elasticsearch
3727
- ELASTICSEARCH_PORT_NUMBER=9200
3828
- ALLOW_EMPTY_PASSWORD=yes
3929
- MAGENTO_ENABLE_HTTP_CACHE=yes
40-
- MAGENTO_HTTP_CACHE_BACKEND_HOST=localhost
30+
- MAGENTO_HTTP_CACHE_BACKEND_HOST=magento
4131
- MAGENTO_HTTP_CACHE_BACKEND_PORT_NUMBER=8080
4232
- MAGENTO_HTTP_CACHE_SERVER_HOST=varnish
43-
- MAGENTO_HTTP_CACHE_SERVER_PORT_NUMBER=8080
33+
- MAGENTO_HTTP_CACHE_SERVER_PORT_NUMBER=80
4434
depends_on:
4535
- mariadb
46-
- elasticsearch
36+
- elasticsearch
37+
varnish:
38+
image: varnish:6
39+
environment:
40+
- VARNISH_SIZE=1G
41+
volumes:
42+
- ./private/varnish:/etc/varnish
43+
ports:
44+
- "80:80"
45+
depends_on:
46+
- magento

0 commit comments

Comments
 (0)