vona-cli-set-api 1.0.60 → 1.0.61

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.
@@ -3,7 +3,6 @@ FROM node:24
3
3
  RUN mkdir -p /opt/node/app/dist
4
4
  WORKDIR /opt/node/app
5
5
 
6
- COPY ./dist/docker /opt/node/app/dist/docker
7
6
  COPY ./scripts /opt/node/app/scripts
8
7
 
9
8
  RUN chmod +x /opt/node/app/scripts/*.sh
@@ -13,6 +13,7 @@ services:
13
13
  ports:
14
14
  - '7202:7102'
15
15
  volumes:
16
+ - ./docker-compose/output/dist/docker:/opt/node/app/dist/docker
16
17
  - ./docker-compose/output/app/vona:/root/vona
17
18
  - ./docker-compose/logs/app:/root/logs
18
19
  command: [./scripts/wait-for-it.sh, 'pg:5432', 'mysql:3306', 'redis:6379', -s, --, ./scripts/app-init.sh]
@@ -32,6 +32,8 @@ BUILD_SOURCEMAP = false
32
32
  BUILD_MINIFY = true
33
33
  BUILD_INLINEDYNAMICIMPORTS = true
34
34
  BUILD_LOG_CIRCULAR_DEPENDENCY = false
35
+ BUILD_COPY_DIST =
36
+ BUILD_COPY_RELEASE =
35
37
 
36
38
  # test
37
39
 
@@ -3,6 +3,10 @@
3
3
  SERVER_KEYS = <%=argv.SERVER_KEYS_PROD%>
4
4
  SERVER_WORKERS = 1
5
5
 
6
+ # build
7
+
8
+ BUILD_COPY_DIST = ./docker-compose/output/dist
9
+
6
10
  # database
7
11
 
8
12
  DATABASE_DEFAULT_CLIENT = 'pg' # pg/mysql
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- cp /opt/node/app/dist/* -r /root/output/app/dist
4
- npm run start:backend
3
+ # cp /opt/node/app/dist/* -r /root/output/app/dist
4
+ # npm run start:backend
5
+ node ./dist/docker/bootstrap.js
@@ -48,6 +48,23 @@ export class CliBinBuild extends BeanCliBase {
48
48
  const outReleasesDir = path.join(projectPath, getOutReleasesDir());
49
49
  await rimraf(outReleasesDir);
50
50
  fse.copySync(outDir, outReleasesDir);
51
+ // copy
52
+ if (process.env.BUILD_COPY_DIST) {
53
+ const envDist = path.isAbsolute(process.env.BUILD_COPY_DIST)
54
+ ? process.env.BUILD_COPY_DIST
55
+ : path.join(projectPath, process.env.BUILD_COPY_DIST);
56
+ const outDirCopy = path.join(envDist, path.basename(outDir));
57
+ fse.removeSync(outDirCopy);
58
+ fse.copySync(outDir, outDirCopy);
59
+ }
60
+ if (process.env.BUILD_COPY_RELEASE) {
61
+ const envRelease = path.isAbsolute(process.env.BUILD_COPY_RELEASE)
62
+ ? process.env.BUILD_COPY_RELEASE
63
+ : path.join(projectPath, process.env.BUILD_COPY_RELEASE);
64
+ const outReleasesDirCopy = path.join(envRelease, path.basename(outReleasesDir));
65
+ fse.removeSync(outReleasesDirCopy);
66
+ fse.copySync(outDir, outReleasesDirCopy);
67
+ }
51
68
  }
52
69
  async _assets(_projectPath, modulesMeta, outDir) {
53
70
  const assetsPath = path.join(outDir, 'assets');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-cli-set-api",
3
3
  "type": "module",
4
- "version": "1.0.60",
4
+ "version": "1.0.61",
5
5
  "description": "vona cli-set-api",
6
6
  "publishConfig": {
7
7
  "access": "public"