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

Cannot install self-hosted instance #6724

Closed
karl-johan-grahn opened this issue Jun 13, 2022 · 35 comments
Closed

Cannot install self-hosted instance #6724

karl-johan-grahn opened this issue Jun 13, 2022 · 35 comments

Comments

@karl-johan-grahn
Copy link

Following https://github.com/ParabolInc/parabol/blob/master/docker/README.md:

$ lima --version
limactl version 0.11.0
$ lima nerdctl --version
nerdctl version 0.20.0
$ lima nerdctl compose -f docker-compose.yml -f docker/docker-compose.selfHosted.yml up -d
INFO[0000] Creating network parabol_parabol-network
INFO[0000] Creating network parabol_default
INFO[0000] Creating volume parabol_redis-data
INFO[0000] Creating volume parabol_rethink-data
INFO[0000] Creating volume parabol_postgres-data
INFO[0000] Creating volume parabol_app-data
WARN[0000] Ignoring: service postgres: [EnvFile]
WARN[0000] Ignoring: volume: Bind: [CreateHostPath]
WARN[0000] Ignoring: service app: [EnvFile]
INFO[0000] Ensuring image redis
[...]
INFO[0008] Ensuring image postgres:12.10
[...]
INFO[0051] Ensuring image rethinkdb:latest
[...]
INFO[0062] Building image parabol_app
[+] Building 235.1s (15/20)
[+] Building 235.3s (15/20)
[+] Building 235.4s (15/20)
[+] Building 235.6s (15/20)
[+] Building 235.7s (15/20)
[+] Building 235.9s (15/20)
[+] Building 236.0s (15/20)
[+] Building 236.2s (15/20)
[+] Building 236.3s (15/20)
[+] Building 236.5s (15/20)
[+] Building 236.6s (15/20)
[+] Building 236.8s (15/20)
[+] Building 236.9s (15/20)
[+] Building 237.1s (15/20)
[+] Building 237.2s (15/20)
[+] Building 237.4s (15/20)
[+] Building 237.5s (15/20)
[+] Building 237.7s (15/20)
[+] Building 237.8s (15/20)
[+] Building 238.0s (15/20)
[+] Building 238.1s (15/20)
[+] Building 238.3s (15/20)
[+] Building 238.5s (15/20)
[+] Building 238.6s (15/20)                                                                                                  [+] Building 238.8s (15/20)                                                                                                  [+] Building 238.9s (15/20)                                                                                                  [+] Building 239.1s (15/20)                                                                                                  [+] Building 239.2s (15/20)                                                                                                  [+] Building 239.4s (15/20)                                                                                                  [+] Building 239.5s (15/20)                                                                                                  [+] Building 239.7s (15/20)                                                                                                  [+] Building 239.8s (15/20)                                                                                                  [+] Building 240.0s (15/20)                                                                                                  [+] Building 240.1s (15/20)                                                                                                  [+] Building 240.3s (15/20)                                                                                                  [+] Building 240.4s (15/20)                                                                                                  [+] Building 240.6s (15/20)                                                                                                  [+] Building 240.7s (15/20)                                                                                                  [+] Building 240.9s (15/20)                                                                                                  [+] Building 241.0s (15/20)                                                                                                  [+] Building 241.2s (15/20)                                                                                                  [+] Building 241.3s (15/20)                                                                                                  [+] Building 241.5s (15/20)                                                                                                  [+] Building 241.6s (15/20)                                                                                                  [+] Building 241.8s (15/20)                                                                                                  [+] Building 241.9s (15/20)                                                                                                  [+] Building 242.1s (15/20)                                                                                                  [+] Building 242.2s (15/20)                                                                                                  [+] Building 242.4s (15/20)                                                                                                  [+] Building 242.5s (15/20)                                                                                                  [+] Building 242.7s (15/20)                                                                                                  [+] Building 242.8s (15/20)                                                                                                  [+] Building 243.0s (15/20)                                                                                                  [+] Building 243.1s (15/20)                                                                                                  [+] Building 243.3s (15/20)                                                                                                  [+] Building 243.4s (15/20)                                                                                                  [+] Building 243.6s (15/20)                                                                                                  [+] Building 243.7s (15/20)                                                                                                  [+] Building 243.9s (15/20)                                                                                                  [+] Building 244.0s (15/20)                                                                                                  [+] Building 244.2s (15/20)                                                                                                  [+] Building 244.3s (15/20)                                                                                                  [+] Building 244.5s (15/20)                                                                                                  [+] Building 244.6s (15/20)                                                                                                  [+] Building 244.8s (15/20)                                                                                                  [+] Building 245.0s (15/20)                                                                                                  [+] Building 245.1s (15/20)                                                                                                  [+] Building 245.3s (15/20)                                                                                                  [+] Building 245.4s (15/20)                                                                                                  [+] Building 245.6s (15/20)                                                                                                  [+] Building 245.7s (15/20)                                                                                                  [+] Building 245.9s (15/20)                                                                                                  [+] Building 246.0s (15/20)                                                                                                  [+] Building 246.2s (15/20)                                                                                                  [+] Building 246.3s (15/20)                                                                                                  [+] Building 246.5s (15/20)                                                                                                  [+] Building 246.6s (15/20)                                                                                                  [+] Building 246.8s (15/20)                                                                                                  [+] Building 246.9s (15/20)                                                                                                  [+] Building 247.1s (15/20)                                                                                                  [+] Building 247.2s (15/20)                                                                                                  [+] Building 247.4s (15/20)                                                                                                  [+] Building 247.5s (15/20)                                                                                                  [+] Building 247.7s (15/20)                                                                                                  [+] Building 247.8s (15/20)                                                                                                  [+] Building 248.1s (16/20)                                                                                                   => [internal] load .dockerignore                                                                                       0.1s  => => transferring context: 165B                                                                                       0.1s  => [internal] load build definition from Dockerfile.prod                                                               0.1s  => => transferring dockerfile: 1.55kB                                                                                  0.0s  => [internal] load metadata for docker.io/library/node:16.14.0                                                         2.0s  => [build  1/10] FROM docker.io/library/node:16.14.0@sha256:61b6cc81ecc3f94f614dca6bfdc5262d15a6618f7aabfbfc6f9f05c9  30.5s  => => resolve docker.io/library/node:16.14.0@sha256:61b6cc81ecc3f94f614dca6bfdc5262d15a6618f7aabfbfc6f9f05c935ee753c   0.1s  => => sha256:38284072a01edf4985907d7f8b96309d56ad47081d2485fd0e7eaf746bedf165 0B / 2.27MB                            245.6s  => => sha256:825c069944691f2f59c392bc3baf87f3dbe4219617b5d147be08ca09f85902d3 0B / 451B                              245.6s  => => sha256:4efdf6f1b568ef131d36654ce007e230846bf0a16908ac6992c21d776d5cfe53 33.55MB / 33.81MB                      245.6s  => => sha256:0ba5b187bf1b90964cdf3971ddceddde53393b6df3e9de6142972443d9613039 0B / 4.20kB                            245.6s  => => sha256:8c03e72651e6b47f74f08da02f8570740d842273289cac86572b8eca1712e9ee 192.42MB / 192.42MB                    245.3s  => => sha256:86c5ff33549498a7154441116b5843e184c1f4441df2eab519ad2c498cb8a716 50.33MB / 51.84MB                      244.9s  => => sha256:cf70e03a8272d87e65c7b1592f97f6e739cf1f5d13cc536670f41c28b086b4cb 9.44MB / 10.00MB                       242.8s  => => sha256:163066942b43a00ba7f4674c4c1ca90eccc8d99366a3dc47cb64e06ad79c36e5 7.34MB / 7.83MB                        241.9s  => => sha256:1c9a8b42b5780ac49c71f392c9512c0167ecc23de9b30b1b5f38747b73097d1a 50.44MB / 50.44MB                      241.1s  => => extracting sha256:1c9a8b42b5780ac49c71f392c9512c0167ecc23de9b30b1b5f38747b73097d1a                               3.0s  => => extracting sha256:163066942b43a00ba7f4674c4c1ca90eccc8d99366a3dc47cb64e06ad79c36e5                               1.2s  => => extracting sha256:cf70e03a8272d87e65c7b1592f97f6e739cf1f5d13cc536670f41c28b086b4cb                               0.3s  => => extracting sha256:86c5ff33549498a7154441116b5843e184c1f4441df2eab519ad2c498cb8a716                               3.3s
 => => extracting sha256:8c03e72651e6b47f74f08da02f8570740d842273289cac86572b8eca1712e9ee                               8.2s
 => => extracting sha256:0ba5b187bf1b90964cdf3971ddceddde53393b6df3e9de6142972443d9613039                               0.1s
 => => extracting sha256:4efdf6f1b568ef131d36654ce007e230846bf0a16908ac6992c21d776d5cfe53                               1.5s
 => => extracting sha256:38284072a01edf4985907d7f8b96309d56ad47081d2485fd0e7eaf746bedf165                               0.1s
 => => extracting sha256:825c069944691f2f59c392bc3baf87f3dbe4219617b5d147be08ca09f85902d3                               0.0s
 => [internal] load build context                                                                                      12.0s
 => => transferring context: 17.44MB                                                                                   11.9s
 => [build  2/10] WORKDIR /parabol                                                                                      0.0s
 => [build  3/10] COPY package.json yarn.lock ./                                                                        0.1s
 => [build  4/10] COPY packages/client/package.json ./packages/client/package.json                                      0.1s
 => [build  5/10] COPY packages/gql-executor/package.json packages/gql-executor/package.json                            0.1s
 => [build  6/10] COPY packages/integration-tests/package.json packages/integration-tests/package.json                  0.1s
 => [build  7/10] COPY packages/server/package.json packages/server/package.json                                        0.1s
 => [build  8/10] RUN yarn install --frozen-lockfile &&       yarn cache clean                                        194.9s
 => [prod  8/13] RUN yarn install --prod --frozen-lockfile &&       yarn cache clean                                  130.7s
 => [prod  9/13] COPY . .                                                                                               2.4s
 => [build  9/10] COPY . .                                                                                              1.7s
 => ERROR [build 10/10] RUN yarn build                                                                                 18.5s
------
 > [build 10/10] RUN yarn build:
#0 0.539 yarn run v1.22.17
#0 0.779 $ node scripts/prod.js
#0 5.494 🙏🙏🙏      Building Production Server      🙏🙏🙏
#0 6.462 Browserslist: caniuse-lite is outdated. Please run:
#0 6.462   npx browserslist@latest --update-db
#0 6.462   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
#0 18.32 webpack://parabol-action/./packages/server/postgres/queries/getUsersByIds.ts?:7
#0 18.32 Object(function webpackMissingModule() { var e = new Error("Cannot find module './generated/getUsersByIdsQuery'"); e.code = 'MODULE_NOT_FOUND'; throw e; }());
#0 18.32                                                  ^
#0 18.32
#0 18.32 Error: Cannot find module './generated/getUsersByIdsQuery'
#0 18.32     at webpackMissingModule (webpack://parabol-action/./packages/server/postgres/queries/getUsersByIds.ts?:7:50)
#0 18.32     at eval (webpack://parabol-action/./packages/server/postgres/queries/getUsersByIds.ts?:7:155)
#0 18.32     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:171:1)
#0 18.32     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:9218:41)
#0 18.32     at eval (webpack://parabol-action/./packages/server/utils/segmentIo.ts?:7:89)
#0 18.32     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:426:1)
#0 18.32     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:9218:41)
#0 18.32     at eval (webpack://parabol-action/./packages/server/graphql/mutations/addAgendaItem.ts?:14:74)
#0 18.32     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:293:1)
#0 18.32     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:9218:41) {
#0 18.32   code: 'MODULE_NOT_FOUND'
#0 18.32 }
#0 18.36 error Command failed with exit code 1.
#0 18.36 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
Dockerfile.prod:17
--------------------
  15 |
  16 |     COPY . .
  17 | >>> RUN yarn build
  18 |
  19 |     # Now, start over with a new stage so we don't pull over devDependencies
--------------------
error: failed to solve: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1
FATA[0248] unrecognized image format
FATA[0310] error while building image parabol_app: exit status 1
@jordanh
Copy link
Contributor

jordanh commented Jun 21, 2022

Hey @karl-johan-grahn – can you give us any more particulars here? Are you able to yarn build locally outside of the context of lima?

@karl-johan-grahn
Copy link
Author

I have a later Node version running locally so cannot build locally:

$ yarn build
yarn run v1.22.19
error parabol-action@6.63.0: The engine "node" is incompatible with this module. Expected version "^16.14.0". Got "18.3.0"
error Commands cannot run with an incompatible environment.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

However that is not what I want to do, I just want to run the compose file. If I don't have Docker desktop, what should I use if Lima doesn't work?

@jordanh
Copy link
Contributor

jordanh commented Jul 20, 2022

@karl-johan-grahn apologies for the delay, most of us were out traveling for the past month or so.

I haven't used lima, so I'm not in a good position to support you. I'd give good ol' docker a try (as it is what our dev team uses) or, if you are open to going local, use something like n to use the same version as what's called out in package.json to get things going that way.

Should you power through, we'd be open to making this easier for others...

We're likely to develop a set of helm charts for folks looking to self host on k8s (as that is what the majority of our self-hosted customers want to do)

@karl-johan-grahn
Copy link
Author

Exactly, I'm looking for a self hosted solution for k8s that is not dependent on Docker Desktop due to their license requirements.

@oyale
Copy link

oyale commented Oct 14, 2022

I'm getting almost the same error while following self-hosted instructions:

 > [build 10/10] RUN yarn build:                                                                                                                                                                                   
#0 0.641 yarn run v1.22.19                                                                                                                                                                                         
#0 0.674 $ node scripts/prod.js                                                                                                                                                                                    
#0 3.980 🙏🙏🙏      Building Production Server      🙏🙏🙏                                                                                                                                                        
#0 11.72 webpack://parabol-action/./packages/server/postgres/queries/getUsersByIds.ts?:7                                                                                                                           
#0 11.72 Object(function webpackMissingModule() { var e = new Error("Cannot find module './generated/getUsersByIdsQuery'"); e.code = 'MODULE_NOT_FOUND'; throw e; }());
#0 11.72                                                  ^
#0 11.72 
#0 11.72 Error: Cannot find module './generated/getUsersByIdsQuery'
#0 11.72     at webpackMissingModule (webpack://parabol-action/./packages/server/postgres/queries/getUsersByIds.ts?:7:50)
#0 11.72     at eval (webpack://parabol-action/./packages/server/postgres/queries/getUsersByIds.ts?:7:155)
#0 11.72     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:171:1)
#0 11.72     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:9647:41)
#0 11.72     at eval (webpack://parabol-action/./packages/server/utils/segmentIo.ts?:7:89)
#0 11.72     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:426:1)
#0 11.72     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:9647:41)
#0 11.72     at eval (webpack://parabol-action/./packages/server/graphql/mutations/addAgendaItem.ts?:14:74)
#0 11.72     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:293:1)
#0 11.72     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:9647:41) {
#0 11.72   code: 'MODULE_NOT_FOUND'
#0 11.72 }
#0 11.75 error Command failed with exit code 1.
#0 11.75 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
failed to solve: executor failed running [/bin/sh -c yarn build]: exit code: 1

I'm running it with docker-compose -f docker-compose.yml -f ./docker/docker-compose.selfHosted.yml up from the root of repo in an up-to-date Manjaro.

Docker Compose version 2.11.2
Docker version 20.10.18, build b40c2f6b5d

I'm using the .env.example file as .env, with the only change of FILE_STORE_PROVIDER var as indicated on docs.


Dev mode

When compiling it on host, following Development section, throws these errors:

Previous errors:
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "AtlassianAuth" does not exist',
23:52:35 8|PG Typed  |   position: '15'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "AtlassianAuth" does not exist',
23:52:35 8|PG Typed  |   position: '15'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "AtlassianAuth" does not exist',
23:52:35 8|PG Typed  |   position: '15'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "OrganizationApprovedDomain" does not exist',
23:52:35 8|PG Typed  |   position: '15'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "OrganizationApprovedDomain" does not exist',
23:52:35 8|PG Typed  |   position: '15'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "MeetingSeries" does not exist',
23:52:35 8|PG Typed  |   position: '15'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "User" does not exist',
23:52:35 8|PG Typed  |   position: '8'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "User" does not exist',
23:52:35 8|PG Typed  |   position: '13'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "Team" does not exist',
23:52:35 8|PG Typed  |   position: '13'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "User" does not exist',
23:52:35 8|PG Typed  |   position: '8'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "Team" does not exist',
23:52:35 8|PG Typed  |   position: '8'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "User" does not exist',
23:52:35 8|PG Typed  |   position: '8'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "User" does not exist',
23:52:35 8|PG Typed  |   position: '8'
23:52:35 8|PG Typed  | }
23:52:35 8|PG Typed  | Error in query. Details: {
23:52:35 8|PG Typed  |   errorCode: 'parserOpenTable',
23:52:35 8|PG Typed  |   hint: undefined,
23:52:35 8|PG Typed  |   message: 'relation "TeamPromptResponse" does not exist',
23:52:35 8|PG Typed  |   position: '8'
23:52:35 8|PG Typed  | }
Same `getUsersByIdsQuery` error:
23:52:56 5|GraphQL Schema Updater  | Error: Cannot find module './generated/getUsersByIdsQuery'
23:52:56 5|GraphQL Schema Updater  |     at webpackMissingModule (webpack://parabol-action/./packages/server/postgres/queries/getUsersByIds.ts?:7:50)
23:52:56 5|GraphQL Schema Updater  |     at eval (webpack://parabol-action/./packages/server/postgres/queries/getUsersByIds.ts?:7:155)
23:52:56 5|GraphQL Schema Updater  |     at Array.<anonymous> (/home/pelayo/projects/parabol/scripts/toolbox/updateSchema.js:171:1)
23:52:56 5|GraphQL Schema Updater  |     at __webpack_require__ (/home/pelayo/projects/parabol/scripts/toolbox/updateSchema.js:10228:41)
23:52:56 5|GraphQL Schema Updater  |     at eval (webpack://parabol-action/./packages/server/utils/segmentIo.ts?:7:89)
23:52:56 5|GraphQL Schema Updater  |     at Array.<anonymous> (/home/pelayo/projects/parabol/scripts/toolbox/updateSchema.js:440:1)
23:52:56 5|GraphQL Schema Updater  |     at __webpack_require__ (/home/pelayo/projects/parabol/scripts/toolbox/updateSchema.js:10228:41)
23:52:56 5|GraphQL Schema Updater  |     at eval (webpack://parabol-action/./packages/server/graphql/mutations/addAgendaItem.ts?:14:74)
23:52:56 5|GraphQL Schema Updater  |     at Array.<anonymous> (/home/pelayo/projects/parabol/scripts/toolbox/updateSchema.js:307:1)
23:52:56 5|GraphQL Schema Updater  |     at __webpack_require__ (/home/pelayo/projects/parabol/scripts/toolbox/updateSchema.js:10228:41) {
23:52:56 5|GraphQL Schema Updater  |   code: 'MODULE_NOT_FOUND'
23:52:56 5|GraphQL Schema Updater  | }

@Dschoordsch
Copy link
Contributor

There seem to be 2 errors:

  • in dev (yarn dev) there seems to be a problem connecting to the postgres database. Please check that the connection string in your .env matches your docker-compose.yml
  • building for production seems to miss the following steps
    yarn db:migrate
    yarn pg:migrate up
    yarn pg:build
    yarn postdeploy
    

@nbartels
Copy link

I'm running in exact the same error as @oyale

I checked out the current master. Created my env file like this:

HOST=<my ip>
REDIS_URL='redis://redis:6379'
RETHINKDB_URL='rethinkdb://db:28015/actionDevelopment'
RETHINKDB_SSL='false'
SERVER_ID='1'
PORT='3000'
PROTO='http'
POSTGRES_PASSWORD=parabol
POSTGRES_USER=pgparaboladmin
POSTGRES_DB=parabol-saas
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_POOL_SIZE=5
FILE_STORE_PROVIDER='local'

And as soon as I start the images with docker-compose up or docker-compose -f docker-compose.yml -f ./docker/docker-compose.selfHosted.yml up, I get the error above on the RUN yarn build command while building the app image.

I tried to start the postgres image first without any change.

Any ideas what I can try next :D

@Dschoordsch
Copy link
Contributor

yarn db:migrate
yarn pg:migrate up
yarn pg:build
yarn postdeploy

Did you run those steps before?

@nbartels
Copy link

nbartels commented Nov 4, 2022

No. Maybe I did not get the Docker intention right. I had this opinion: I checkout this repository, create a .env file and run docker-compose up and I'm ready to use a self hosted version.
I have no yarn locally installed, so I have to modify the build script to let it run these commands?

@Dschoordsch
Copy link
Contributor

Unfortunately this is not how it works today. Running docker-compose up only starts up the required services (RethinkDB, Postgres, Redis). You would still need to run the app itself locally or built a docker image for it yourself (i.e. there is no pre-built docker image for it).

@karl-johan-grahn
Copy link
Author

Eh ok that was not my expectations, can we improve the docs to make this clear please

@Dschoordsch
Copy link
Contributor

Yes, please. Any PR is welcome, also those improving the documentation.

@nbartels
Copy link

nbartels commented Nov 4, 2022

That's really confusing, because the docker-compose.yml has a app services that builds the image and starts it with the other services

@Dschoordsch
Copy link
Contributor

You're right, we worked on this at some point. Looking at the Dockerfile.prod it's missing the above mentioned steps to generate all necessary files and it would need access to the database during the build to generate these. Then it should work.

@nbartels
Copy link

nbartels commented Nov 4, 2022

Okay, I see. After creating another docker-compose file with postgres and rethink in it. I was able to get further. I think some scripts could be helpful to get the selfhosted version with docker on the road. As soon as I got everything working, I try to fiddle some PR for you. From a data protection perspective this should be very helpful ;)

@Ben-Bock
Copy link

Hi @nbartels - could you share your docker-compose file here, since I'm running exactly into the same issues. Some help here would be great. Thx

@nbartels
Copy link

@Ben-Bock sure. But it was not that easy. Please check the commits on my personal branch: https://github.com/nbartels/parabol/commits/dev-2022

I modified the Dockerfile.prod and added two new docker-compose files, that are split versions of the original docker-compose file. Additionally, I added a commit from another branch, because I don't use the Google configuration in the env file.
BTW, I changed the volumes to directories on our self-hosted version.

With the new docker-compose files you can start the environment (redis, postgres and so on) apart from the application build.

@ocroquette
Copy link

Hi everyone,

I am trying to set up a self-hosted instance too. I followed the instructions in the README and got also the error:

Error: Cannot find module './generated/getUsersByIdsQuery'

That is how I ended up here.

I tried with the information and commits from @nbartels, but now I get this error:

Error: getaddrinfo EAI_AGAIN db
Migration error RethinkDBError [ReqlDriverError]: Error initializing master pool
    at MasterConnectionPool.<anonymous> (/parabol/node_modules/rethinkdb-ts-migrate/node_modules/rethinkdb-ts/lib/connection/master-pool.js:138:32)
    at Object.onceWrapper (node:events:642:26)
    at MasterConnectionPool.emit (node:events:527:28)
    at MasterConnectionPool.setHealthy (/parabol/node_modules/rethinkdb-ts-migrate/node_modules/rethinkdb-ts/lib/connection/master-pool.js:301:18)
    at ServerConnectionPool.<anonymous> (/parabol/node_modules/rethinkdb-ts-migrate/node_modules/rethinkdb-ts/lib/connection/master-pool.js:292:18)
    at ServerConnectionPool.emit (node:events:539:35)
    at ServerConnectionPool.setHealthy (/parabol/node_modules/rethinkdb-ts-migrate/node_modules/rethinkdb-ts/lib/connection/server-pool.js:131:18)
    at ServerConnectionPool.persistConnection (/parabol/node_modules/rethinkdb-ts-migrate/node_modules/rethinkdb-ts/lib/connection/server-pool.js:202:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ServerConnectionPool.createConnection (/parabol/node_modules/rethinkdb-ts-migrate/node_modules/rethinkdb-ts/lib/connection/server-pool.js:137:9) {
  msg: 'Error initializing master pool',
  type: 3,
  cause: Error: getaddrinfo EAI_AGAIN db
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) {
    errno: -3001,
    code: 'EAI_AGAIN',
    syscall: 'getaddrinfo',
    hostname: 'db'
  },
  term: undefined,
  backtrace: undefined
}
Error: getaddrinfo EAI_AGAIN db

I am not familiar with docker, docker-compose or yarn. Step-by-step instructions how to set up a self-hosted instance from scratch on a clean system (any Linux distribution would do) would be greatly appreciated. I am willing to improve the documentation and create a pull request, but I need some input from more knowledgeable people first.

@bayukp
Copy link

bayukp commented Feb 8, 2023

For who still finding a way to run it through docker-compose I manage to make it work in here https://github.com/bayukp/dokku-parabol/pull/1/files

EDIT: Updated on master branch, deployment to dokku and docker compose should work correctly. Plus I update the README on my fork

But I still getting error like @karl-johan-grahn when try to deploy it to dokku

I tried both using default heroku buildpacks and using Dockerfile builder (dokku builder-dockerfile:set parabol dockerfile-path docker/Dockerfile.prod) but that's really weird since running on docker-compose up -d on my local works perfectly

@ocroquette
Copy link

Thank you very much @bayukp, by cloning your fork and following you instructions from 54b4d30 I was able to start the containers without a glitch.
However, I cannot connect to the application. I expected it on port 3000 as HTTP, but the connection gets reset immediately. I can connect to 8080 and see the RethinkDB interface though.
I will try soon with Dokku.

@bayukp
Copy link

bayukp commented Feb 21, 2023

That's great @ocroquette , I update the main README.md docs btw. Let me know if you still facing any issue since mine works correctly both using docker compose and deploy to dokku

However, I cannot connect to the application. I expected it on port 3000 as HTTP, but the connection gets reset immediately. I can connect to 8080 and see the RethinkDB interface though.

You can try to see the app log, as I mentioned in README that the app needs a fully connected database during deployment, so after it's deployed make sure to check logs until its done with migration and building + showing this log :

2023-02-10T02:45:26.698581809Z app[web.1]: 🔥🔥🔥 Server ID: 1. Ready for Sockets: Port 80 🔥🔥🔥
2023-02-10T02:45:30.390679700Z app[web.1]: 💧💧💧 Server ID: 11. Ready for GraphQL Execution 💧💧💧
2023-02-10T02:45:31.257729102Z app[web.1]: 💧💧💧 Server ID: 1. Ready for GraphQL Execution 💧💧💧

(depends on your computer or server it can take up to 10 mins to fully migrate and build the app AFTER deployment)

After that you can try again to open it in the browser

@kemalgoekhan
Copy link

if you want to use docker-compose -f docker-compose.yml -f ./docker/docker-compose.selfHosted.yml up -d without dokku, installing as docker. it has the same problem even they created docker-compose.yml with depends on argument.

0 7.896 🙏🙏🙏      Building Production Server      🙏🙏🙏
#0 25.12 webpack://parabol-action/./packages/server/postgres/queries/getUsersByIds.ts?:4
#0 25.12 var _getUsersByIdsQuery = __webpack_require__(Object(function webpackMissingModule() { var e = new Error("Cannot find module './generated/getUsersByIdsQuery'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
#0 25.12                                                                                                ^
#0 25.12
#0 25.12 Error: Cannot find module './generated/getUsersByIdsQuery'
#0 25.12     at webpackMissingModule (webpack://parabol-action/./packages/server/postgres/queries/getUsersByIds.ts?:4:96)
#0 25.12     at eval (webpack://parabol-action/./packages/server/postgres/queries/getUsersByIds.ts?:4:201)
#0 25.12     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:176:1)
#0 25.12     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:10189:41)
#0 25.12     at eval (webpack://parabol-action/./packages/server/utils/segmentIo.ts?:2:22)
#0 25.12     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:431:1)
#0 25.12     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:10189:41)
#0 25.12     at eval (webpack://parabol-action/./packages/server/graphql/mutations/addAgendaItem.ts?:9:18)
#0 25.12     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:298:1)
#0 25.12     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:10189:41)
#0 25.12     at eval (webpack://parabol-action/./packages/server/graphql/rootMutation.ts?:2:22)
#0 25.12     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:291:1)
#0 25.12     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:10189:41)
#0 25.12     at eval (webpack://parabol-action/./packages/server/graphql/public/rootSchema.ts?:17:21)
#0 25.12     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:242:1)
#0 25.12     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:10189:41)
#0 25.12     at eval (webpack://parabol-action/./packages/server/graphql/private/rootSchema.ts?:3:19)
#0 25.12     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:207:1)
#0 25.12     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:10189:41)
#0 25.12     at eval (webpack://parabol-action/./packages/server/utils/updateGQLSchema.ts?:11:19)
#0 25.12     at Array.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:193:1)
#0 25.12     at __webpack_require__ (/parabol/scripts/toolbox/updateSchema.js:10189:41)
#0 25.12     at /parabol/scripts/toolbox/updateSchema.js:10242:37
#0 25.12     at Object.<anonymous> (/parabol/scripts/toolbox/updateSchema.js:10247:12)
#0 25.12     at Module._compile (node:internal/modules/cjs/loader:1254:14)
#0 25.12     at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
#0 25.12     at Module.load (node:internal/modules/cjs/loader:1117:32)
#0 25.12     at Module._load (node:internal/modules/cjs/loader:958:12)
#0 25.12     at Module.require (node:internal/modules/cjs/loader:1141:19)
#0 25.12     at require (node:internal/modules/cjs/helpers:110:18)
#0 25.12     at updateGraphQLSchema (/parabol/scripts/runSchemaUpdater.js:29:10)
#0 25.12     at runSchemaUpdater (/parabol/scripts/runSchemaUpdater.js:34:10)
#0 25.12     at async generateGraphQLArtifacts (/parabol/scripts/generateGraphQLArtifacts.js:7:3)
#0 25.12     at async prod (/parabol/scripts/prod.js:25:3) {
#0 25.12   code: 'MODULE_NOT_FOUND'
#0 25.12 }
#0 25.12
#0 25.12 Node.js v18.14.2
#0 25.24 error Command failed with exit code 1.
#0 25.24 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
failed to solve: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1

@bayukp
Copy link

bayukp commented Mar 14, 2023

@kemalgoekhan could you try my fork?

@kemalgoekhan
Copy link

@bayukp hey bayu, I cloned your repo and deployed with docker compose up -d only. I got error because of sentry but I have env which have lots of commented out options. Do you now why?

image

#ATLASSIAN_CLIENT_ID='key_ATLASSIAN_CLIENT_ID'
#ATLASSIAN_CLIENT_SECRET='key_ATLASSIAN_CLIENT_SECRET'
AUTH_INTERNAL_DISABLED='false'
AUTH_GOOGLE_DISABLED='false'
AUTH_SSO_DISABLED='false'
SERVER_SECRET='key_SERVER_SECRET'
#AWS_ACCESS_KEY_ID='key_AWS_ACCESS_KEY_ID'
#AWS_REGION='key_AWS_REGION'
#AWS_S3_BUCKET='action-files.parabol.co'
#AWS_SECRET_ACCESS_KEY='key_AWS_SECRET_ACCESS_KEY'
# CDN_BASE_URL='key_CDN_BASE_URL' # Only enable when FILE_STORE_PROVIDER=s3
#CI='true'
#DD_AGENT_HOST='172.17.0.1'
#DD_API_KEY='DD_API_KEY'
#DD_APM_ENABLED='false'
#DD_TRACE_ENABLED='false'
#DD_ENV='local'
FILE_STORE_PROVIDER='local'
#GITHUB_CLIENT_ID='key_GITHUB_CLIENT_ID'
#GITHUB_CLIENT_SECRET='key_GITHUB_CLIENT_SECRET'
#GITHUB_WEBHOOK_SECRET='key_GITHUB_WEBHOOK_SECRET'
#GITLAB_CLIENT_ID='key_GITLAB_CLIENT_ID'
#GITLAB_CLIENT_SECRET='key_GITLAB_CLIENT_SECRET'
#GOOGLE_CLOUD_CLIENT_EMAIL='key_GOOGLE_CLOUD_CLIENT_EMAIL'
#GOOGLE_CLOUD_PRIVATE_KEY='key_GOOGLE_CLOUD_PRIVATE_KEY'
#GOOGLE_CLOUD_PRIVATE_KEY_ID='key_GOOGLE_CLOUD_PRIVATE_KEY_ID'
#GOOGLE_OAUTH_CLIENT_ID='client_id'
#GOOGLE_OAUTH_CLIENT_SECRET='secret'
GRAPHQL_HOST='localhost:3000'
GRAPHQL_PROTOCOL='http'
HOST='parabol.xxxxxx.xxxxx'
INVITATION_SHORTLINK='parabol.xxxxxx.xxxxx/invitation-link'
# MAIL GLOBALS. PROVIDER: mailgun | google | debug | smtp
MAIL_PROVIDER='smtp'
MAIL_FROM='key_MAIL_FROM'
MAILGUN_API_KEY='key_MAILGUN_API_KEY'
MAILGUN_DOMAIN='key_MAILGUN_DOMAIN'
MAIL_GOOGLE_USER='key_MAIL_GOOGLE_USER'
MAIL_GOOGLE_PASS='key_MAIL_GOOGLE_PASS'
MAIL_SMTP_HOST='key_MAIL_SMTP_HOST'
MAIL_SMTP_PORT=587
MAIL_SMTP_USER='key_MAIL_SMTP_USER'
MAIL_SMTP_PASSWORD='key_MAIL_SMTP_PASSWORD'
MAIL_SMTP_USE_TLS='1' # set to '0' for false
MAIL_SMTP_CIPHERS='HIGH:MEDIUM:!aNULL:!eNULL:@STRENGTH:!DH:!kEDH'
MIN_LOG_DURATION='200'
OAUTH2_REDIRECT=''
PGADMIN_DEFAULT_EMAIL='pgadmin4@pgadmin.org'
PGADMIN_DEFAULT_PASSWORD='admin'
PORT='3000'
POSTGRES_PASSWORD=parabol
POSTGRES_USER=pgparaboladmin
POSTGRES_DB=parabol-saas
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_POOL_SIZE=5
POSTGRES_SSL_REJECT_UNAUTHORIZED=false
POSTGRES_SSL_DIR='/var/lib/postgresql'
PROTO='http'
REDIS_URL='redis://redis:6379'
RETHINKDB_URL='rethinkdb://db:28015/actionDevelopment'
#REDIS_URL='redis://redis:6379'
#RETHINKDB_URL='rethinkdb://db:28015/actionDevelopment'
RETHINKDB_SSL='false'
# SEGMENT_WRITE_KEY='key_SEGMENT_WRITE_KEY'
#SENTRY_AUTH_TOKEN='key_SENTRY_AUTH_TOKEN'
# SENTRY_DSN='key_SENTRY_DSN'
# Cluster node number 0 - 1023
SERVER_ID='1'
#SLACK_CLIENT_ID='key_SLACK_CLIENT_ID'
#SLACK_CLIENT_SECRET='key_SLACK_CLIENT_SECRET'
SOCKET_PORT='3001'
# https://stripe.com/docs/keys
#STRIPE_SECRET_KEY='sk_test_4eC39HqLyjWDarjtT1zdp7dc'
#STRIPE_PUBLISHABLE_KEY='pk_test_TYooMQauvdEDq54NiTphI7jx'
#STRIPE_WEBHOOK_SECRET='sk_test_4eC39HqLyjWDarjtT1zdp7dc'
#ULTRAHOOK_API_KEY='key_ULTRAHOOK_API_KEY'

@bayukp
Copy link

bayukp commented Apr 6, 2023

Hi @kemalgoekhan

I'm pretty sure that is just a log. it means there is something wrong when the user accesses Parabol and tries to send a sentry event.

Do you able to receive the sentry event on your sentry account? Does the website running on your end?

If it's running well then it shouldn't be an issue, I also often receive multiple sentry error events but at least the app still working correctly so I don't bother.

@kemalgoekhan
Copy link

thanks for response @bayukp, after I typed, I understood it is just log. but also once I deployed, the app image does not shown correct. I updated this image. For example, i need to see my comments 'safsafsa' and click to next button but I cant do it. Do you have any idea for the reason?
image

@bayukp
Copy link

bayukp commented May 16, 2023

Hi @kemalgoekhan

For image disappearing have you make the storage persistent? can you ssh to the container and check /parabol/selfHosted if it's containing any of your images?

For the can't type issue I can't help you without any logs, do you see anything on the error log? At least that doesn't happen in my end.

@ocroquette
Copy link

Just in case someone is in the same situation as we were: we needed a tool for effort estimation on premise. Parabol looked great, but it was too difficult to deploy. Now we use Poinz (https://github.com/Zuehlke/poinz), which is much simpler, both in terms of functionality and installation.

@chrism417
Copy link

Is this something that's going to be updated so we don't have to use @bayukp's fork?

@Dschoordsch
Copy link
Contributor

This part of the app is under heavy development. To see the current state, you should start here: https://github.com/ParabolInc/parabol/tree/master/docker/parabol-ubi/docker-build

@chrism417
Copy link

@Dschoordsch I started from here and so far I can build the image, but can't start it with the error:

error Couldn't find a package.json file in "/home/node/parabol"

I tried to use Build from git and it looks like it's almost complete, but fails on:

178.5 yarn run v1.22.19
178.5 $ node --max-old-space-size=8192 scripts/prod.js
178.7 fatal: not a git repository (or any of the parent directories): .git
178.7 node:child_process:960
178.7     throw err;
178.7     ^
178.7
178.7 Error: Command failed: git rev-parse HEAD
178.7 fatal: not a git repository (or any of the parent directories): .git
178.7
178.7     at checkExecSyncError (node:child_process:885:11)
178.7     at Object.execSync (node:child_process:957:15)
178.7     at Object.<anonymous> (/home/node/parabol/scripts/webpack/prod.servers.config.js:18:24)
178.7     at Module._compile (node:internal/modules/cjs/loader:1256:14)
178.7     at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
178.7     at Module.load (node:internal/modules/cjs/loader:1119:32)
178.7     at Module._load (node:internal/modules/cjs/loader:960:12)
178.7     at Module.require (node:internal/modules/cjs/loader:1143:19)
178.7     at require (node:internal/modules/cjs/helpers:110:18) {
178.7   status: 128,
178.7   signal: null,
178.7   output: [
178.7     null,
178.7     Buffer(0) [Uint8Array] [],
178.7     Buffer(69) [Uint8Array] [
178.7       102,  97, 116,  97, 108,  58,  32, 110, 111, 116,  32,
178.7        97,  32, 103, 105, 116,  32, 114, 101, 112, 111, 115,
178.7       105, 116, 111, 114, 121,  32,  40, 111, 114,  32,  97,
178.7       110, 121,  32, 111, 102,  32, 116, 104, 101,  32, 112,
178.7        97, 114, 101, 110, 116,  32, 100, 105, 114, 101,  99,
178.7       116, 111, 114, 105, 101, 115,  41,  58,  32,  46, 103,
178.7       105, 116,  10
178.7     ]
178.7   ],
178.7   pid: 409,
178.7   stdout: Buffer(0) [Uint8Array] [],
178.7   stderr: Buffer(69) [Uint8Array] [
178.7     102,  97, 116,  97, 108,  58,  32, 110, 111, 116,  32,
178.7      97,  32, 103, 105, 116,  32, 114, 101, 112, 111, 115,
178.7     105, 116, 111, 114, 121,  32,  40, 111, 114,  32,  97,
178.7     110, 121,  32, 111, 102,  32, 116, 104, 101,  32, 112,
178.7      97, 114, 101, 110, 116,  32, 100, 105, 114, 101,  99,
178.7     116, 111, 114, 105, 101, 115,  41,  58,  32,  46, 103,
178.7     105, 116,  10
178.7   ]
178.7 }
178.7
178.7 Node.js v18.17.0
178.7 error Command failed with exit code 1.
178.7 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
parabol.dockerfile:13

This is my full export list:

export postgresql_tag=12.10-alpine; \
export rethinkdb_tag=2.4.2; \
export redis_tag=6.2.6; \
export _BUILD_ENV_PATH=environments/local-buildenv \
export _NODE_VERSION=18.17.0 \
export _DOCKER_REPOSITORY=parabol \
export _PARABOL_GIT_REF=v6.124.0 \
export _DOCKER_TAG=v1.0.0

@nbartels
Copy link

somehow the .git directory is missing. Did you use git to "copy" the code on your machine?

@Dschoordsch
Copy link
Contributor

We're not building the app inside docker because of speed. We're cleaning up the existing build and just dockerize it, you can see this in our GitHub workflow.

Copy link
Contributor

Stale issue

@github-actions github-actions bot added the stale label Apr 14, 2024
@jordanh
Copy link
Contributor

jordanh commented May 20, 2024

Scrubbed after going stale – Iceboxing this thread. Happy for folks to open new issues when they run into trouble!

@jordanh jordanh closed this as completed May 20, 2024
@jordanh jordanh added icebox and removed stale labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants