Teejay
(Teejay)
July 30, 2021, 10:42pm
1
Issues information
Your issue
Immediately get an error while trying to deploy – not sure why.
If I hard code environment variables into my docker file I’m able to run the container successfully locally.
Dockerfile content (if any)
FROM python:3.9
WORKDIR /bot
COPY . .
RUN pip install -r requirements.txt
CMD python -u app.py
Teejay
(Teejay)
August 1, 2021, 12:47am
2
have since updated my dockerfile to utilize cron yet still cannot deploy.
new Dockerfile
FROM python:3-slim
RUN apt-get update && apt-get upgrade
# Set up cron job
RUN apt-get -y install cron vim
RUN touch /var/log/cron.log
RUN echo "*/30 * * * * root /usr/local/bin/python3 /bot/app.py" >> /etc/cron.d/crontab
RUN chmod 0644 /etc/cron.d/crontab
# Install dependencies
COPY . /bot/
RUN pip3 install -r /bot/requirements.txt
CMD ["cron", "-f"]
Aggis15
(Aggis )
August 1, 2021, 9:55am
3
Can you please run it locally with Docker and let me know if there are any errors? Thanks!
Teejay
(Teejay)
August 2, 2021, 1:06am
5
No errors locally once environment variables are added.
Erebe
(Romain Gerard)
August 2, 2021, 2:18pm
6
Hello @Teejay ,
I took a look at your deployment error, and it seems that for now we can’t handle properly secret with special character in it "
.
So your application is failing to deploy due to Qovery not being able to handle your secret json correctly.
In the meantime that we fix this issue, you can base64 encode your secret and decode them when you start the application.
I am going to try to fix this issue ASAP, but as summer is here and we are in short number in the team due to vacation, I can’t guarantee any ETA.
I am letting you know when I have a fix deployed
Teejay
(Teejay)
August 2, 2021, 4:55pm
7
No worries! I’m happy enough just knowing the reason it was failing so I can work around it – such as the encoding you suggested.
Thanks!
Erebe
(Romain Gerard)
August 3, 2021, 9:59am
8
Hi back
The issue should be fixed and deployed on Qovery community.
Let me know if you encounter an issue again
Thanks for reporting