Closed cocodrino closed 4 years ago
Is the value set in dokku config botengine_worker
?
Hi @josegonzalez pretty fast :sweat_smile: , yest it's set there
dokku config botengine_worker
! Deprecated: Use the 'config:show' command instead
=====> botengine_worker env vars
DOKKU_APP_TYPE: dockerfile
GIT_REV: 4ba8d8daf89fe3b821cd2cdd1ae8faa02f417771
RABBITMQ_URL: amqp://rabbitmq:c109xxx241f@dokku-rabbitmq-rabbitmq:5672/rabbitmq
Environment variables are not available during dockerfile build, is that where you are having this issue?
If not, then try running dokku ps:rebuild botengine_worker
and checking again.
not, it fails running the script, my dockerfile is really ~terrible~ simple
FROM node:10
RUN apt-get update || : && apt-get install python -y
WORKDIR /botengine
COPY /botengine .
RUN yarn run update:deps:yarn
RUN yarn run start:rt_worker
CMD [ "yarn","run", "start:rt_worker" ]
inside the running script I initialize a connection to rabbit, the script starts with this code
console.info("RABBITMQ env ", process.env["RABBITMQ_URL"])
and I get undefined there
you should remove that RUN yarn run start:worker
call. This attempts to start the process during the build.
oh crap...what a noob mistake :see_no_evil: !..I didn't even notice that I had these...you rock man :metal: thanks!
Hi, I've an app "botengine_worker" linked to rabbitmq service "rabbitmq"
my code try to read this env var but it always return undefined
do I need some extra step that I'm missing?...please let me know if you need more information or that I run some command...thank you so much