diff --git a/.yarnclean b/.yarnclean new file mode 100644 index 0000000000..b591611ea7 --- /dev/null +++ b/.yarnclean @@ -0,0 +1,45 @@ +# test directories +__tests__ +test +tests +powered-test + +# asset directories +docs +doc +website +images +assets + +# examples +example +examples + +# code coverage directories +coverage +.nyc_output + +# build scripts +Makefile +Gulpfile.js +Gruntfile.js + +# configs +appveyor.yml +circle.yml +codeship-services.yml +codeship-steps.yml +wercker.yml +.tern-project +.gitattributes +.editorconfig +.*ignore +.eslintrc +.jshintrc +.flowconfig +.documentup.json +.yarn-metadata.json +.travis.yml + +# misc +*.md diff --git a/docker-compose.yml b/docker-compose.yml index 7e370d3728..1b07219685 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: steedos: build: context: ./ - dockerfile: ./docker/Dockerfile.dev + dockerfile: ./docker/Dockerfile image: steedos/steedos-community:dev ports: - "6000:6000" diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000000..051f0452a5 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,44 @@ +FROM node:14-slim AS builder + +RUN apt-get update || : && apt-get install -y \ + python \ + curl \ + build-essential + +WORKDIR /app + +COPY ./.env ./ +COPY ./lerna.json ./ +COPY ./package.json ./ +COPY ./steedos.config.js ./ +COPY ./yarn.lock ./ +COPY ./.yarnclean ./.yarnclean +COPY ./packages ./packages +COPY ./server ./packages/server +COPY ./services ./services +COPY ./steedos-packages ./services +COPY ./ee ./services + +RUN yarn +RUN yarn run build +RUN yarn autoclean +RUN yarn lerna clean --yes + +FROM node:14-slim + +ENV NODE_ENV=production +ENV NODE_OPTIONS="--max-old-space-size=4096" + +WORKDIR /app + +COPY --from=builder ./app/.env ./ +COPY --from=builder ./app/lerna.json ./ +COPY --from=builder ./app/package.json ./ +COPY --from=builder ./app/steedos.config.js ./ +COPY --from=builder /app/packages ./packages +COPY --from=builder /app/services ./services + +RUN yarn --production +RUN yarn cache clean + +CMD ["yarn", "start"] diff --git a/package.json b/package.json index f6ec03a0bd..3b02a71a5c 100644 --- a/package.json +++ b/package.json @@ -20,18 +20,17 @@ }, "resolutions": { "@salesforce/ts-types": "1.1.2", - "**/fibers": "5.0.3" + "**/fibers": "5.0.3", + "**/type-fest": "0.21.3" }, "devDependencies": { + "cnpm": "9.0.1", + "tslib": "^2.4.0", "@babel/core": "^7.8.4", "@types/express-serve-static-core": "~4.17.29", "@types/node": "18.0.3", "lerna": "^4.0.0", "nodemon": "^2.0.19", "typescript": "4.6.3" - }, - "dependencies": { - "cnpm": "9.0.1", - "tslib": "^2.4.0" } } diff --git a/yarn.lock b/yarn.lock index fc9c1d1437..47a3e84e3f 100644 Binary files a/yarn.lock and b/yarn.lock differ