0

I need to increase the heap size limit with --max_old_space_size=6144, but I'm not sure how to pass flags to node in Wercker.

my wercker.yml is

box: node:6.9.1

build:
  steps:
    - npm-install@1.1.4
    - script:
        name: package
        code: npm run-script package

container:
  steps:
    - npm-install@1.1.4:
        cwd: container/
        options: --only=prod
    - script:
        name: create output directory
        code: mkdir -p $WERCKER_OUTPUT_DIR
    - script:
        name: copy to output directory
        code: cp -rp container/* $WERCKER_OUTPUT_DIR

push:
  steps:
    - script:
        name: create srv directory
        code: mkdir -p /srv
    - script:
        name: create cert directory
        code: mkdir -p /etc/ssl/private
    - script:
        name: copy source to srv directory
        code: cp -rp $WERCKER_SOURCE_DIR/* /srv
    - internal/docker-push:
        ports: 80, 443
        entrypoint: "node --max_old_space_size=6144"
        cmd: .
        working-dir: /srv
        volumes: /etc/ssl/private
        env: '"NODE_ENV=production"'
        author: $MAINTAINER
        repository: some/repo
        tag: $DOCKER_HUB_TAG, $WERCKER_GIT_COMMIT, $WERCKER_GIT_BRANCH
        username: $DOCKER_HUB_USERNAME
        password: $DOCKER_HUB_PASSWORD
        registry: https://registry.hub.docker.com/v2
Jay
  • 9,314
  • 7
  • 33
  • 40
  • I would suggest using the ["exec" form of ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#/entrypoint), but I'm not sure how to set that in the Wercker step arguments. Maybe try asking in the [Wercker Slack](http://slack.wercker.com/). – ocean Feb 24 '17 at 02:48

1 Answers1

0

Wercker says that for ENTRYPOINT they "only support a single string value, which will be converted to exec form using go-shlex".

Have you tried the entrypoint: argument with and without quotes?

ocean
  • 1,335
  • 15
  • 26