Skip to content

Commit 2c8f979

Browse files
committed
Refactor to use K3d and Tilt
1 parent 9b9c788 commit 2c8f979

25 files changed

+144
-2
lines changed

Tiltfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
docker_build('backend', 'backend')
2+
3+
k8s_yaml('deployment.yaml')
File renamed without changes.

backend/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.8.12-slim-bullseye
2+
3+
WORKDIR /backend
4+
5+
RUN pip install poetry==1.1.12 gunicorn==20.1.0
6+
ENV POETRY_VIRTUALENVS_CREATE=false
7+
8+
COPY pyproject.toml poetry.lock ./
9+
RUN poetry install --no-dev --no-root
10+
11+
COPY manager .
12+
13+
ENTRYPOINT ["gunicorn", "manager.wsgi"]
14+
CMD ["--bind", "0.0.0.0:8000"]
File renamed without changes.
File renamed without changes.
File renamed without changes.

manager/manager/settings.py renamed to backend/manager/manager/settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# SECURITY WARNING: don't run with debug turned on in production!
2626
DEBUG = True
2727

28-
ALLOWED_HOSTS = []
28+
ALLOWED_HOSTS = ['*']
2929

3030

3131
# Application definition
@@ -43,6 +43,7 @@
4343

4444
MIDDLEWARE = [
4545
'django.middleware.security.SecurityMiddleware',
46+
'whitenoise.middleware.WhiteNoiseMiddleware',
4647
'django.contrib.sessions.middleware.SessionMiddleware',
4748
'django.middleware.common.CommonMiddleware',
4849
'django.middleware.csrf.CsrfViewMiddleware',
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)