From 563087eeae39975c2254454481384b950dc9fe41 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 23 Oct 2021 13:41:10 +0000 Subject: [PATCH] upgrade template @2.1.33 --- .../templates/default/_package.json | 16 ++++---- .../templates/default/docker-compose.yml | 40 ++++++++++++++++++- .../default/steedos-app/_package.json | 2 +- 3 files changed, 47 insertions(+), 11 deletions(-) diff --git a/packages/create-steedos-app/templates/default/_package.json b/packages/create-steedos-app/templates/default/_package.json index 319642ca2f..3a18d3a7f9 100644 --- a/packages/create-steedos-app/templates/default/_package.json +++ b/packages/create-steedos-app/templates/default/_package.json @@ -1,6 +1,6 @@ { "name": "@steedos/steedos-project-template", - "version": "2.1.32", + "version": "2.1.33", "private": false, "repository": "https://github.com/steedos/steedos-project-template.git", "description": "", @@ -27,13 +27,13 @@ "author": "", "license": "ISC", "dependencies": { - "@steedos/service-charts": "2.1.32", - "@steedos/service-metadata-server": "2.1.32", - "@steedos/service-mongodb-server": "2.1.32", - "@steedos/service-package-loader": "2.1.32", - "@steedos/service-package-registry": "2.1.32", - "@steedos/service-pages": "2.1.32", - "@steedos/service-steedos-server": "2.1.32", + "@steedos/service-charts": "2.1.33", + "@steedos/service-metadata-server": "2.1.33", + "@steedos/service-mongodb-server": "2.1.33", + "@steedos/service-package-loader": "2.1.33", + "@steedos/service-package-registry": "2.1.33", + "@steedos/service-pages": "2.1.33", + "@steedos/service-steedos-server": "2.1.33", "aliyun-sdk": "1.12.3", "async-retry": "^1.3.1", "aws-sdk": "2.0.23", diff --git a/packages/create-steedos-app/templates/default/docker-compose.yml b/packages/create-steedos-app/templates/default/docker-compose.yml index ae90604808..0b3c8d2c7b 100644 --- a/packages/create-steedos-app/templates/default/docker-compose.yml +++ b/packages/create-steedos-app/templates/default/docker-compose.yml @@ -9,9 +9,17 @@ services: - "5000:5000" volumes: - "./storage:/app/storage" - - "./.env.local:/app/.env.local" + - "./.steedos:/app/.steedos" + environment: + - ROOT_URL=http://localhost:5000 + - MONGO_URL=mongodb://mongo:27018/steedos + - STEEDOS_CFS_STORE=local + - STEEDOS_STORAGE_DIR=/app/storage + - TRANSPORTER=redis://redis:6389 + - CACHER=redis://redis:6389/2 depends_on: - redis + - mongo redis: image: redis:6.2.4 @@ -20,4 +28,32 @@ services: - "./docker-volumes/redis/data:/data" command: ["/bin/sh","-c", "redis-server --save \"\" --appendonly no"] ports: - - "6389:6379" \ No newline at end of file + - "6389:6379" + + mongo: + image: mongo:4.2 + restart: always + volumes: + - "./docker-volumes/mongo/data/db:/data/db" + command: mongod --oplogSize 128 --profile=1 --slowms=500 --replSet rs0 --bind_ip_all + ports: + - "27018:27017" + + # this container's job is just run the command to initialize the replica set. + # it will run the command and remove himself (it will not stay running) + mongo-init-replica: + image: mongo:4.2 + command: > + bash -c + "for i in `seq 1 30`; do + mongo mongo/steedos --eval \" + rs.initiate({ + _id: 'rs0', + version: 1, + members: [ { _id: 0, host: 'mongo:27017' } ]})\" && + s=$$? && break || s=$$?; + echo \"Tried $$i times. Waiting 5 secs...\"; + sleep 5; + done; (exit $$s)" + depends_on: + - mongo \ No newline at end of file diff --git a/packages/create-steedos-app/templates/default/steedos-app/_package.json b/packages/create-steedos-app/templates/default/steedos-app/_package.json index 95f7eb1b4f..439267bf1b 100644 --- a/packages/create-steedos-app/templates/default/steedos-app/_package.json +++ b/packages/create-steedos-app/templates/default/steedos-app/_package.json @@ -1,6 +1,6 @@ { "name": "steedos-app-default", - "version": "2.1.32", + "version": "2.1.33", "description": "A Steedos App", "main": "package.service.js", "license": "MIT",