diff --git a/Dockerfile b/Dockerfile index e2559eb..a1d2fc5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN git clone https://git.kucharczyk.xyz/lukas/timetracker.git /home/timetracker WORKDIR /home/timetracker/app RUN chown -R timetracker /home/timetracker/app RUN poetry install -RUN make migrate && make loadplatforms EXPOSE 8000 USER timetracker -CMD [ "python3", "src/web/manage.py", "runserver", "0.0.0.0:8000" ] \ No newline at end of file +ENTRYPOINT [ "entrypoint.sh" ] +# CMD [ "python3", "src/web/manage.py", "runserver", "0.0.0.0:8000" ] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..5ea3aa9 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/env bash +# Apply database migrations +echo "Apply database migrations" +python manage.py migrate + +# Start server +echo "Starting server" +python manage.py runserver 0.0.0.0:8000 \ No newline at end of file