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

Fail to build with Docker compose. #4068

Closed
MichelDiz opened this issue Aug 13, 2019 · 7 comments
Closed

Fail to build with Docker compose. #4068

MichelDiz opened this issue Aug 13, 2019 · 7 comments

Comments

@MichelDiz
Copy link

Issue Summary

A summary of the issue and the browser/OS environment in which it occurs.
Windows 10 - Docker.

Steps to Reproduce

  1. This is the first step https://redash.io/help/open-source/dev-guide/docker
    I'm just trying to use the latest commit to test Dgraph. But there's errors blocking me. I can't build master.
PS C:\Users\micheldiz\Github\redash> docker-compose up -d
Building server
Step 1/18 : FROM node:10 as frontend-builder
 ---> 9b9d314e0a86
Step 2/18 : WORKDIR /frontend
 ---> Using cache
 ---> 2c645ddf9629
Step 3/18 : COPY package.json package-lock.json /frontend/
 ---> Using cache
 ---> 631129efb8ff
Step 4/18 : RUN npm install
 ---> Using cache
 ---> dbaf1e09129b
Step 5/18 : COPY client /frontend/client
 ---> Using cache
 ---> 91c15008e412
Step 6/18 : COPY webpack.config.js /frontend/
 ---> Using cache
 ---> b9260b7b6ab9
Step 7/18 : RUN npm run build
 ---> Running in 456213d01247

> [email protected] build /frontend
> npm run clean && NODE_ENV=production node --max-old-space-size=4096 node_modules/.bin/webpack


> [email protected] clean /frontend
> rm -rf ./client/dist/

Browserslist: caniuse-lite is outdated. Please run next command `npm update caniuse-lite browserslist`
Killed
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! [email protected] build: `npm run clean && NODE_ENV=production node --max-old-space-size=4096 node_modules/.bin/webpack`
npm ERR! Exit status 137
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-08-13T18_03_47_394Z-debug.log
ERROR: Service 'server' failed to build: The command '/bin/sh -c npm run build' returned a non-zero code: 137
@arikfr
Copy link
Member

arikfr commented Aug 14, 2019

You probably need to allocate more memory to your Docker VM.

But if you just want to test the Dgraph connection, you can use the redash/redash:preview Docker image, which tracks the master branch and has Dgraph support.

@Jakdaw
Copy link
Contributor

Jakdaw commented Aug 14, 2019

Isn't this the same thing I'm talking about here:

https://discuss.redash.io/t/errors-from-npm-run-build/4330

Whole bunch of eslint errors.... I ended up just skipping eslint as I'm JS-phobic.

@MichelDiz
Copy link
Author

Okay, if it's RAM the issue and there is other way. I guess is a case closed. Thanks folks.

@arikfr
Copy link
Member

arikfr commented Aug 15, 2019

@MichelDiz did you manage to run it with the prebuilt image?

@chang
Copy link
Contributor

chang commented Aug 15, 2019

For posterity, I was running into the same error and bumping the amount memory allocated to Docker (https://stackoverflow.com/questions/44533319/how-to-assign-more-memory-to-docker-container) fixed it. Thanks @arikfr!

@MichelDiz
Copy link
Author

@arikfr not really. I tried for a few hours, but always appeared an error and another. Now it seems to be running but I can't access outside the containers. Not sure why.
Here's my YML:

version: '3'
services:
  postgres:
    image: 'postgres:9.5.12'
    environment:
      - POSTGRES_PASSWORD=pass
      - POSTGRES_USER=user
      - POSTGRES_DB=db
    ports:
      - '5432:5432'
    volumes:
      - /var/lib/postgresql/data
  redis:
    image: 'redis:3.0-alpine'
    restart: always
  redash:
    image: 'redash/redash:preview'
    ports:
      - '5000:5000'
    depends_on:
      - postgres
      - redis
    environment:
      PYTHONUNBUFFERED: 0
      REDASH_LOG_LEVEL: INFO
      REDASH_REDIS_URL: 'redis://redis:6379/0'
      REDASH_DATABASE_URL: 'postgres://user:pass@postgres/db'
      REDASH_COOKIE_SECRET: veryverysecret
      REDASH_WEB_WORKERS: 4
    restart: always
    command: server
  worker:
    image: 'redash/redash:preview'
    command: scheduler
    environment:
      PYTHONUNBUFFERED: 0
      REDASH_LOG_LEVEL: INFO
      REDASH_REDIS_URL: 'redis://redis:6379/0'
      REDASH_DATABASE_URL: 'postgres://user@postgres/db'
      QUEUES: 'queries,scheduled_queries,celery'
      WORKERS_COUNT: 2
    restart: always

@MichelDiz
Copy link
Author

I've no luck at all.
I've increased the RAM. It went a little further. But fails. After that video I gave 21 GB of RAM and the error keeps going.

I've also tried start from scratch doing docker prune commands.

https://youtu.be/4fQzW59VAZc

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

4 participants