@vendure/create 2.0.0-next.26 → 2.0.0-next.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,6 @@ WORKDIR /usr/src/app
4
4
 
5
5
  COPY package.json ./
6
6
  COPY {{#if useYarn}}yarn.lock{{else}}package-lock.json{{/if}} ./
7
- RUN {{#if useYarn}}yarn{{else}}npm install{{/if}}
7
+ RUN {{#if useYarn}}yarn{{else}}npm install{{/if}} --production
8
8
  COPY . .
9
9
  RUN {{#if useYarn}}yarn{{else}}npm run{{/if}} build
package/assets/readme.hbs CHANGED
@@ -55,7 +55,8 @@ We've included a sample [Dockerfile](./Dockerfile) which you can build with the
55
55
  docker build -t vendure .
56
56
  ```
57
57
 
58
- and then run it with:
58
+ This builds an image and tags it with the name "vendure". We can then run it with:
59
+
59
60
  ```
60
61
  # Run the server
61
62
  docker run -dp 3000:3000 -e "DB_HOST=host.docker.internal" --name vendure-server vendure npm run start:server
@@ -64,6 +65,20 @@ docker run -dp 3000:3000 -e "DB_HOST=host.docker.internal" --name vendure-server
64
65
  docker run -dp 3000:3000 -e "DB_HOST=host.docker.internal" --name vendure-worker vendure npm run start:worker
65
66
  ```
66
67
 
68
+ Here is a breakdown of the command used above:
69
+
70
+ - `docker run` - run the image we created with `docker build`
71
+ - `-dp 3000:3000` - the `-d` flag means to run in "detached" mode, so it runs in the background and does not take
72
+ control of your terminal. `-p 3000:3000` means to expose port 3000 of the container (which is what Vendure listens
73
+ on by default) as port 3000 on your host machine.
74
+ - `-e "DB_HOST=host.docker.internal"` - the `-e` option allows you to define environment variables. In this case we
75
+ are setting the `DB_HOST` to point to a special DNS name that is created by Docker desktop which points to the IP of
76
+ the host machine. Note that `host.docker.internal` only exists in a Docker Desktop environment and thus should only be
77
+ used in development.
78
+ - `--name vendure-server` - we give the container a human-readable name.
79
+ - `vendure` - we are referencing the tag we set up during the build.
80
+ - `npm run start:server` - this last part is the actual command that should be run inside the container.
81
+
67
82
  ### Docker compose
68
83
 
69
84
  We've included a sample [docker-compose.yml](./docker-compose.yml) file which demonstrates how the server, worker, and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendure/create",
3
- "version": "2.0.0-next.26",
3
+ "version": "2.0.0-next.28",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "create": "./index.js"
@@ -28,13 +28,13 @@
28
28
  "@types/handlebars": "^4.1.0",
29
29
  "@types/listr": "^0.14.2",
30
30
  "@types/semver": "^6.2.2",
31
- "@vendure/core": "^2.0.0-next.26",
31
+ "@vendure/core": "^2.0.0-next.28",
32
32
  "rimraf": "^3.0.2",
33
33
  "ts-node": "^10.2.1",
34
34
  "typescript": "4.5.5"
35
35
  },
36
36
  "dependencies": {
37
- "@vendure/common": "^2.0.0-next.26",
37
+ "@vendure/common": "^2.0.0-next.28",
38
38
  "chalk": "^4.1.0",
39
39
  "commander": "^7.1.0",
40
40
  "cross-spawn": "^7.0.3",
@@ -47,5 +47,5 @@
47
47
  "semver": "^7.3.2",
48
48
  "tcp-port-used": "^1.0.1"
49
49
  },
50
- "gitHead": "04477be85afbe0c7f3378f8f4826f74d5410a3a1"
50
+ "gitHead": "6811d6554afbb0e0d993da4788499bcd3563d5ab"
51
51
  }