Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,9 @@ class InitCommand extends Command {
}
// create or append to .gitignore
const ignoreFile = `${workingDir}/.gitignore`;
await writeFile(
ignoreFile,
`.nhost\n`,
{
flag: "a",
}
);
await writeFile(ignoreFile, ".nhost\napi/node_modules", {
flag: "a",
});

// .env.development for hasura webhooks, headers, etc
const envFile = `${workingDir}/.env.development`;
Expand All @@ -148,7 +144,7 @@ class InitCommand extends Command {
// so that it doesn't get run again when promoting local
// changes to that environment
const initMigration = fs.readdirSync(migrationDirectory)[0];
const version = initMigration.match(/^[0-9]+/)[0];
const version = initMigration.match(/^\d+/)[0];
command = `hasura migrate apply --version "${version}" --skip-execution ${commonOptions}`;
await exec(command, { cwd: nhostDir });

Expand Down
14 changes: 8 additions & 6 deletions src/util/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ services:
HASURA_GRAPHQL_MIGRATIONS_SERVER_TIMEOUT: 20
HASURA_GRAPHQL_NO_OF_RETRIES: 20
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: public
NHOST_HASURA_ENDPOINT: http://localhost:{{ hasura_graphql_port }}/v1/graphql
NHOST_CUSTOM_API_ENDPOINT: http://localhost:{{ api_port }}
NHOST_HBP_ENDPOINT: http://localhost:{{ hasura_backend_plus_port }}
NHOST_HASURA_ENDPOINT: http://nhost_hasura:{{ hasura_graphql_port }}/v1/graphql
NHOST_WEBHOOK_SECRET: devnhostwebhooksecret
NHOST_HBP_ENDPOINT: http://nhost_hbp:{{ hasura_backend_plus_port }}
NHOST_CUSTOM_API_ENDPOINT: http://nhost_api:{{ api_port }}
env_file:
- {{ env_file }}
command:
Expand Down Expand Up @@ -72,10 +73,11 @@ services:
dockerfile: ./.nhost/Dockerfile-api
environment:
PORT: {{ api_port }}
NHOST_HASURA_ENDPOINT: http://localhost:{{ hasura_graphql_port }}/v1/graphql
NHOST_CUSTOM_API_ENDPOINT: http://localhost:{{ api_port }}
NHOST_HBP_ENDPOINT: http://localhost:{{ hasura_backend_plus_port }}
NHOST_HASURA_ENDPOINT: http://nhost_hasura:{{ hasura_graphql_port }}/v1/graphql
NHOST_HASURA_ADMIN_SECRET: {{ hasura_graphql_admin_secret }}
NHOST_WEBHOOK_SECRET: devnhostwebhooksecret
NHOST_HBP_ENDPOINT: http://nhost_hbp:{{ hasura_backend_plus_port }}
NHOST_CUSTOM_API_ENDPOINT: http://nhost_api:{{ api_port }}
ports:
- '{{ api_port }}:{{ api_port }}'
env_file:
Expand Down