@webhikers/cli 1.1.14 → 1.1.16

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webhikers/cli",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "CLI for creating and deploying webhikers projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,5 +1,5 @@
1
1
  import { execSync } from "child_process";
2
- import { existsSync, writeFileSync } from "fs";
2
+ import { existsSync, readFileSync, writeFileSync } from "fs";
3
3
  import { resolve } from "path";
4
4
  import { loadConfig, getConfigPath } from "../utils/config-store.js";
5
5
 
@@ -148,6 +148,10 @@ export async function createCommand(name) {
148
148
  });
149
149
  const projectUuid = project.uuid;
150
150
 
151
+ console.log(c.dim(" Reading compose file..."));
152
+ const composeContent = readFileSync(resolve(projectDir, "docker-compose.yaml"), "utf-8");
153
+ const composeBase64 = Buffer.from(composeContent).toString("base64");
154
+
151
155
  console.log(c.dim(" Creating application..."));
152
156
  const app = await coolifyApi(config, "POST", "/applications/private-github-app", {
153
157
  project_uuid: projectUuid,
@@ -158,16 +162,13 @@ export async function createCommand(name) {
158
162
  git_branch: "master",
159
163
  build_pack: "dockercompose",
160
164
  ports_exposes: "3000",
161
- instant_deploy: false,
162
- });
163
- const appUuid = app.uuid;
164
-
165
- console.log(c.dim(` Setting domain...`));
166
- await coolifyApi(config, "PATCH", `/applications/${appUuid}`, {
165
+ docker_compose_raw: composeBase64,
167
166
  docker_compose_domains: [
168
167
  { name: "app", domain: `https://${domain}` },
169
168
  ],
169
+ instant_deploy: false,
170
170
  });
171
+ const appUuid = app.uuid;
171
172
 
172
173
  console.log(c.dim(" Setting environment variables..."));
173
174
  await coolifyApi(config, "POST", `/applications/${appUuid}/envs`, {