create-steedos-app 2.1.72 → 2.1.76

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.
@@ -68,6 +68,7 @@ function createProject(name) {
68
68
  '.steedos/**',
69
69
  '!.steedos/node_modules/**',
70
70
  '.vscode/**',
71
+ '.scripts/**'
71
72
  ], projectDir, {
72
73
  parents: true,
73
74
  flat: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-steedos-app",
3
- "version": "2.1.72",
3
+ "version": "2.1.76",
4
4
  "keywords": [
5
5
  "steedos"
6
6
  ],
@@ -26,11 +26,14 @@
26
26
  "create-steedos-app": "./index.js"
27
27
  },
28
28
  "dependencies": {
29
- "@geek/spinner": "^1.0.0",
29
+ "@geek/spinner": "1.0.0",
30
30
  "chalk": "3.0.0",
31
31
  "commander": "4.1.0",
32
32
  "cpy": "7.3.0",
33
33
  "fs-extra": "8.1.0"
34
34
  },
35
- "gitHead": "d91af1babddf6dce23cd087899cdb6ae930dbf8d"
35
+ "resolutions": {
36
+ "**/chalk": "3.0.0"
37
+ },
38
+ "gitHead": "51e4a2340c3c5a79384bb0d364dfe2ee044c6d7a"
36
39
  }
@@ -0,0 +1,7 @@
1
+ const Redis = require("ioredis");
2
+ require('dotenv-flow').config(process.cwd());
3
+ const redis = new Redis(process.env.CACHER);
4
+ redis.flushdb(() => {
5
+ console.log(`flushdb: ${process.env.CACHER}`);
6
+ process.exit(0)
7
+ });
@@ -0,0 +1,13 @@
1
+ # create mongodb data directory
2
+ mkdir -p /workspace/mongodb/data/db
3
+
4
+ # create .env.local
5
+ cp .env .env.local
6
+
7
+ # replace ROOT_URL
8
+ root_replacement="ROOT_URL=$(gp url 5000)"
9
+ sed -i "/^ROOT_URL=*/c$root_replacement" .env.local
10
+
11
+ # replace METADATA_SERVER
12
+ meta_replacement="METADATA_SERVER=$(gp url 5000)"
13
+ sed -i "/^METADATA_SERVER=*/c$meta_replacement" .env.local
@@ -28,7 +28,7 @@
28
28
  "author": "",
29
29
  "license": "ISC",
30
30
  "dependencies": {
31
- "@steedos/service-community": "^2.1.66"
31
+ "@steedos/service-community": "^2.1"
32
32
  },
33
33
  "devDependencies": {
34
34
  "eslint": "^7.7.0",
@@ -40,6 +40,7 @@
40
40
  "homepage": "https://www.steedos.com",
41
41
  "resolutions": {
42
42
  "typeorm": "0.2.28",
43
+ "**/chalk": "3.0.0",
43
44
  "**/lodash": "^4.17.15",
44
45
  "**/handlebars": "^4.3.0",
45
46
  "**/debug": "^3.1.0",
@@ -56,4 +57,4 @@
56
57
  "publishConfig": {
57
58
  "access": "public"
58
59
  }
59
- }
60
+ }
@@ -1,2 +1,52 @@
1
- FROM steedos/gitpod-workspace-base:latest
1
+ FROM gitpod/workspace-base:latest
2
2
 
3
+
4
+ ### Install MongoDB ###
5
+ # Source: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu-tarball/#install-mongodb-community-edition
6
+ USER root
7
+ RUN mkdir -p /tmp/mongodb && \
8
+ cd /tmp/mongodb && \
9
+ wget -qOmongodb.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.2.17.tgz && \
10
+ tar xf mongodb.tgz && \
11
+ cd mongodb-* && \
12
+ sudo cp bin/* /usr/local/bin/ && \
13
+ rm -rf /tmp/mongodb
14
+
15
+ ### Install Redis ###
16
+ USER root
17
+ RUN curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg \
18
+ && echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list \
19
+ && sudo apt-get update \
20
+ && apt-get install -y redis
21
+
22
+
23
+ ### Install Docker ###
24
+ LABEL dazzle/layer=tool-docker
25
+ LABEL dazzle/test=tests/tool-docker.yaml
26
+ USER root
27
+ ENV TRIGGER_REBUILD=3
28
+ # https://docs.docker.com/engine/install/ubuntu/
29
+ RUN curl -o /var/lib/apt/dazzle-marks/docker.gpg -fsSL https://download.docker.com/linux/ubuntu/gpg \
30
+ && apt-key add /var/lib/apt/dazzle-marks/docker.gpg \
31
+ && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
32
+ && install-packages docker-ce docker-ce-cli containerd.io
33
+
34
+ RUN curl -o /usr/bin/slirp4netns -fsSL https://github.com/rootless-containers/slirp4netns/releases/download/v1.1.12/slirp4netns-$(uname -m) \
35
+ && chmod +x /usr/bin/slirp4netns
36
+
37
+ RUN curl -o /usr/local/bin/docker-compose -fsSL https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64 \
38
+ && chmod +x /usr/local/bin/docker-compose
39
+
40
+ ### Install Nodejs ###
41
+ USER gitpod
42
+ ENV NODE_VERSION=12.22.7
43
+ ENV TRIGGER_REBUILD=2
44
+ RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | PROFILE=/dev/null bash \
45
+ && bash -c ". .nvm/nvm.sh \
46
+ && nvm install $NODE_VERSION \
47
+ && nvm alias default $NODE_VERSION \
48
+ && npm install -g typescript yarn node-gyp"
49
+ ENV PATH=$PATH:/home/gitpod/.nvm/versions/node/v${NODE_VERSION}/bin
50
+
51
+ ### Install Steedos Cli ###
52
+ RUN npm i steedos-cli --global
@@ -1,4 +1,4 @@
1
- image: steedos/gitpod-workspace-base:latest
1
+ image: ecr.aws.steedos.cn/dockerhub/steedos/gitpod-workspace-base:2.1
2
2
 
3
3
  # List the ports you want to expose and what to do when they are served. See https://www.gitpod.io/docs/config-ports/
4
4
  ports:
@@ -17,15 +17,19 @@ ports:
17
17
  visibility: public
18
18
  # List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/
19
19
  tasks:
20
- - init: sh ./.scripts/setup.sh
20
+ - name: MongoDB
21
+ init: sh ./.scripts/setup.sh
21
22
  command: |
22
23
  mongod --replSet rs0 --dbpath /workspace/mongodb/data/db
23
24
  - command: |
24
25
  gp await-port 27017
25
26
  mongo steedos --eval "rs.initiate()"
26
- - command: |
27
+ exit
28
+ - name: Redis
29
+ command: |
27
30
  redis-server --save "" --appendonly no --client-output-buffer-limit replica 0 0 0 --client-output-buffer-limit pubsub 0 0 0 --client-output-buffer-limit slave 0 0 0
28
- - init: |
31
+ - name: Steedos
32
+ init: |
29
33
  yarn install
30
34
  command: |
31
35
  gp await-port 27017
@@ -38,4 +42,5 @@ vscode:
38
42
  - redhat.vscode-yaml
39
43
  - steedos.steedosdx-vscode
40
44
  - steedos.steedosdx-vscode-core
41
- - eamodio.gitlens
45
+ - ms-ceintl.vscode-language-pack-zh-hans
46
+ - mongodb.mongodb-vscode