I am trying to create an addon using the django framework.
I create my Docker image and it runs, but I can not execute the interface. I don’t know if anything else is necessary.
The directory:
Dockerfile:
ARG BUILD_FROM
FROM $BUILD_FROM
ENV LANG C.UTF-8
# Copy data for add-on
COPY run.sh /
# Install requirements for add-on
RUN apk add --no-cache python3
RUN pip3 install Django
WORKDIR /test
COPY . /test/
RUN chmod a+x /run.sh
# Start server
EXPOSE 8000
STOPSIGNAL SIGTERM
CMD [ "/run.sh" ]
run.sh
#!/usr/bin/with-contenv bashio
echo test
pwd
python3 --version
python3 manage.py runserver 8000
config.json
{
"name": "Test",
"version": "0.0.1",
"slug": "test",
"description": "Test",
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],
"startup": "before",
"boot": "auto",
"options": {},
"schema": {},
"ports": {
"8000/tcp": 8000
}
}
The addon is installed, the image is created and the container runs… but if I try to see the web page (myhassioIP:8000), the browser days “The site can’t be reached”.
I don’t know what to do, maybe someone can help me. Thank you!