Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandbox connector containers fail in a freshly cloned repo #40

Open
czeni opened this issue Mar 7, 2025 · 0 comments
Open

Sandbox connector containers fail in a freshly cloned repo #40

czeni opened this issue Mar 7, 2025 · 0 comments

Comments

@czeni
Copy link

czeni commented Mar 7, 2025

Problem

In a freshly cloned repo, the sandbox's docker compose build creates connector images, which later fails due to missing .env files.

infrastructure      | /usr/src/app/src/config/environment.ts:91
infrastructure      |             throw new Error(
infrastructure      |                   ^
infrastructure      | Error: Error initializing environment. Could not find .env file
infrastructure      |     at setupEnvironment (/usr/src/app/src/config/environment.ts:91:19)
infrastructure      |     at main (/usr/src/app/src/index.ts:7:21)
infrastructure      |     at Object.<anonymous> (/usr/src/app/src/index.ts:13:5)
infrastructure      |     at Module._compile (node:internal/modules/cjs/loader:1554:14)
infrastructure      |     at Module.m._compile (/usr/src/app/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:1618:23)
infrastructure      |     at node:internal/modules/cjs/loader:1706:10
infrastructure      |     at Object.require.extensions.<computed> [as .ts] (/usr/src/app/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:1621:12)
infrastructure      |     at Module.load (node:internal/modules/cjs/loader:1289:32)
infrastructure      |     at Function._load (node:internal/modules/cjs/loader:1108:12)
infrastructure      |     at TracingChannel.traceSync (node:diagnostics_channel:322:14)
infrastructure      | [nodemon] app crashed - waiting for file changes before starting...
provider            | /usr/src/app/src/config/environment.ts:91
provider            |             throw new Error(
provider            |                   ^
provider            | Error: Error initializing environment. Could not find .env file
provider            |     at setupEnvironment (/usr/src/app/src/config/environment.ts:91:19)
provider            |     at main (/usr/src/app/src/index.ts:7:21)
provider            |     at Object.<anonymous> (/usr/src/app/src/index.ts:13:5)
provider            |     at Module._compile (node:internal/modules/cjs/loader:1554:14)
provider            |     at Module.m._compile (/usr/src/app/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:1618:23)
provider            |     at node:internal/modules/cjs/loader:1706:10
provider            |     at Object.require.extensions.<computed> [as .ts] (/usr/src/app/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:1621:12)
provider            |     at Module.load (node:internal/modules/cjs/loader:1289:32)
provider            |     at Function._load (node:internal/modules/cjs/loader:1108:12)
provider            |     at TracingChannel.traceSync (node:diagnostics_channel:322:14)
provider            | [nodemon] app crashed - waiting for file changes before starting...
consumer            | /usr/src/app/src/config/environment.ts:91
consumer            |             throw new Error(
consumer            |                   ^
consumer            | Error: Error initializing environment. Could not find .env file
consumer            |     at setupEnvironment (/usr/src/app/src/config/environment.ts:91:19)
consumer            |     at main (/usr/src/app/src/index.ts:7:21)
consumer            |     at Object.<anonymous> (/usr/src/app/src/index.ts:13:5)
consumer            |     at Module._compile (node:internal/modules/cjs/loader:1554:14)
consumer            |     at Module.m._compile (/usr/src/app/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:1618:23)
consumer            |     at node:internal/modules/cjs/loader:1706:10
consumer            |     at Object.require.extensions.<computed> [as .ts] (/usr/src/app/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:1621:12)
consumer            |     at Module.load (node:internal/modules/cjs/loader:1289:32)
consumer            |     at Function._load (node:internal/modules/cjs/loader:1108:12)
consumer            |     at TracingChannel.traceSync (node:diagnostics_channel:322:14)
consumer            | [nodemon] app crashed - waiting for file changes before starting...

Possible solution

Add .env creation step to the sandbox documentation.

$ git clone [email protected]:Prometheus-X-association/dataspace-connector.git
$ cd dataspace-connector && cp .env.sample .env
$ cd sandbox/infrastructure
$ COMPOSE_BAKE=true docker compose build
$ docker compose up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant