-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
136 additions
and
517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web/settings/local.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
FROM python:3.12 | ||
FROM ubuntu/nginx:1.24-24.04_beta | ||
|
||
WORKDIR /app/web | ||
RUN apt-get update \ | ||
&& apt-get install -y python3.12 python3.12-venv \ | ||
&& apt-get clean | ||
|
||
ENTRYPOINT ["/app/docker-entrypoint.sh"] | ||
EXPOSE 3000 | ||
CMD ["python", "./manage.py", "runserver", "0.0.0.0:3000"] | ||
COPY web /app/ | ||
COPY --chown=nobody:nogroup web/media /media | ||
COPY web/settings/docker.py.example /app/settings/docker.py | ||
COPY requirements.txt / | ||
COPY nginx.conf /etc/nginx/ | ||
|
||
COPY . /app/ | ||
COPY web/settings/docker.py.example /app/web/settings/docker.py | ||
RUN pip install -r /app/requirements.txt | ||
RUN python3.12 -m venv venv | ||
ENV PATH="/venv/bin:$PATH" | ||
|
||
WORKDIR /app | ||
|
||
RUN rm -rf /app/media \ | ||
&& mkdir /db \ | ||
&& pip install -r /requirements.txt \ | ||
&& tr -dc A-Za-z0-9 < /dev/urandom | head -c 40 > /secret.txt \ | ||
&& python manage.py makemigrations tupa \ | ||
&& python manage.py migrate \ | ||
&& nginx -t \ | ||
&& echo "gunicorn --daemon --bind unix:/tmp/kipa.sock wsgi --error-logfile /tmp/errors " > /docker-entrypoint.d/gunicorn.sh \ | ||
&& chmod +x /docker-entrypoint.d/gunicorn.sh \ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.