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

Parsing error of CRON_TIME in docker-compose.yml #143

Closed
rwv opened this issue Dec 10, 2018 · 3 comments
Closed

Parsing error of CRON_TIME in docker-compose.yml #143

rwv opened this issue Dec 10, 2018 · 3 comments
Assignees

Comments

@rwv
Copy link

rwv commented Dec 10, 2018

$ docker-compose up
Recreating uptimerobot-page_uptimerobot-page_1_c370e42683f3 ... done
Attaching to uptimerobot-page_uptimerobot-page_1_c370e42683f3
uptimerobot-page_1_c370e42683f3 | /app/node_modules/cron/lib/cron.js:411
uptimerobot-page_1_c370e42683f3 | 					throw new Error('Field (' + field + ') cannot be parsed');
uptimerobot-page_1_c370e42683f3 | 					^
uptimerobot-page_1_c370e42683f3 |
uptimerobot-page_1_c370e42683f3 | Error: Field ("0-59/1) cannot be parsed
uptimerobot-page_1_c370e42683f3 |     at CronTime._parseField (/app/node_modules/cron/lib/cron.js:411:12)
uptimerobot-page_1_c370e42683f3 |     at CronTime._parse (/app/node_modules/cron/lib/cron.js:375:10)
uptimerobot-page_1_c370e42683f3 |     at new CronTime (/app/node_modules/cron/lib/cron.js:46:9)
uptimerobot-page_1_c370e42683f3 |     at new CronJob (/app/node_modules/cron/lib/cron.js:477:19)
uptimerobot-page_1_c370e42683f3 |     at _default (/app/build/bootstrap/cron.js:13:28)
uptimerobot-page_1_c370e42683f3 |     at createAPP (/app/build/bootstrap/app.js:44:21)
uptimerobot-page_1_c370e42683f3 |     at Object.<anonymous> (/app/build/bootstrap/index.js:9:32)
uptimerobot-page_1_c370e42683f3 |     at Module._compile (internal/modules/cjs/loader.js:688:30)
uptimerobot-page_1_c370e42683f3 |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
uptimerobot-page_1_c370e42683f3 |     at Module.load (internal/modules/cjs/loader.js:598:32)
uptimerobot-page_1_c370e42683f3 |     at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
uptimerobot-page_1_c370e42683f3 |     at Function.Module._load (internal/modules/cjs/loader.js:529:3)
uptimerobot-page_1_c370e42683f3 |     at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
uptimerobot-page_1_c370e42683f3 |     at startup (internal/bootstrap/node.js:285:19)
uptimerobot-page_1_c370e42683f3 |     at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
uptimerobot-page_uptimerobot-page_1_c370e42683f3 exited with code 1

I deleted the environment variables CRON_TIME in docker-compose.yml and it works properly.

@rwv rwv changed the title Parsing error of CRON_TIME in docker-compose.yml Parsing error of CRON_TIME in docker-compose.yml Dec 10, 2018
@giuem
Copy link
Owner

giuem commented Dec 11, 2018

Error: Field ("0-59/1) cannot be parsed

The error shows that "0-59/1 cannot be parsed.

Do you configure CRON_TIME correctly? Maybe you forget to close quotation.

😥 It would be better if you provide docker-compose.yml file.

@giuem giuem self-assigned this Dec 11, 2018
@rwv
Copy link
Author

rwv commented Dec 17, 2018

Have sent to giuem.com+GitHub@googlemail.com, thank you.

@giuem
Copy link
Owner

giuem commented Dec 17, 2018

It's my mistake. Now it should work.

TL; DR

In docker compose file, there are two ways to configure environment variables. If using an array, docker compose will NOT strip quotes as bash did. (see docker/compose#2854)

So just remove quotes between CRON_TIME field and it works.

@giuem giuem closed this as completed Dec 17, 2018
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

2 participants