Run Dockerfile via entrypoint.sh
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Lukáš Kucharczyk 2023-01-03 13:04:05 +01:00
parent 7d31f6f416
commit 811e7771cc
2 changed files with 10 additions and 2 deletions

View File

@ -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" ]
ENTRYPOINT [ "entrypoint.sh" ]
# CMD [ "python3", "src/web/manage.py", "runserver", "0.0.0.0:8000" ]

8
entrypoint.sh Normal file
View File

@ -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