File tree Expand file tree Collapse file tree 10 files changed +52
-25
lines changed
Expand file tree Collapse file tree 10 files changed +52
-25
lines changed Original file line number Diff line number Diff line change 1+ .git /
2+ .github /
3+ .holo /
4+ computer-vision-form-project /
15env /
2- frontend /
6+ frontend /
7+ helm-chart /
8+ metabase /
9+ node_modules /
10+ script /
11+ unified-reporting-system /
12+
13+ ** /* .md
14+ .dockerignore
15+ .gitignore
16+ Dockerfile
17+ docker-compose.yml
Original file line number Diff line number Diff line change 11FROM python:3.7-slim
22
33ARG APP_USER=appuser
4+ ENV DJANGO_SETTINGS_MODULE=core.settings.docker
45
56COPY . /app
67WORKDIR /app
@@ -27,6 +28,8 @@ RUN set -ex \
2728 ' \
2829 && apt-get update && apt-get install -y $buildDeps --no-install-recommends \
2930 && pip install pipenv && pip install uwsgi && pipenv install --system \
30- && apt-get purge -y --auto-remove $buildDeps
31+ && apt-get purge -y --auto-remove $buildDeps
32+
33+ RUN python manage.py collectstatic --no-input
3134
3235CMD ["uwsgi" , "uwsgi.ini" ]
Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ services:
1313 - " 8000:8000"
1414 depends_on :
1515 - db
16- environment :
17- - DJANGO_SETTINGS_MODULE=core.settings.docker
1816 client :
1917 build : ./frontend
2018 ports :
Original file line number Diff line number Diff line change 1+ .cache /
2+ dist /
13node_modules /
24test /
3- .cache
4- dist /
5+
6+ Dockerfile
7+ nginx.conf
Original file line number Diff line number Diff line change @@ -5,4 +5,3 @@ RUN yarn && yarn build
55
66FROM nginx:alpine
77COPY --from=0 /app/dist /usr/share/nginx/html
8- COPY ./nginx.conf /etc/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change 3434 hostAliases :
3535 - ip : " 127.0.0.1"
3636 hostnames :
37- - " app"
3837 - " db"
3938 containers :
4039 {{- with .Values.backend }}
@@ -47,14 +46,14 @@ spec:
4746 env :
4847 - name : DJANGO_SETTINGS_MODULE
4948 value : core.settings.docker
50- # livenessProbe:
51- # httpGet:
52- # path: /
53- # port: 8000
54- # readinessProbe:
55- # httpGet:
56- # path: /
57- # port: 8000
49+ livenessProbe :
50+ httpGet :
51+ path : /admin /
52+ port : 8000
53+ readinessProbe :
54+ httpGet :
55+ path : /admin /
56+ port : 8000
5857 {{- end }}
5958 {{- with .Values.frontend }}
6059 - name : {{ $.Chart.Name }}-frontend
Original file line number Diff line number Diff line change 11{{- if .Values.ingress.enabled -}}
22{{- $fullName := include "prevention-point.fullname" . -}}
3- {{- $svcPort := .Values.service.port -}}
43{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
54apiVersion : networking.k8s.io/v1beta1
65{{- else -}}
3635 - path : {{ . }}
3736 backend :
3837 serviceName : {{ $fullName }}
39- servicePort : {{ $svcPort }}
38+ servicePort : frontend-http
39+ - path : {{ . | trimSuffix "/" }}/api/
40+ backend :
41+ serviceName : {{ $fullName }}
42+ servicePort : backend-http
43+ - path : {{ . | trimSuffix "/" }}/admin/
44+ backend :
45+ serviceName : {{ $fullName }}
46+ servicePort : backend-http
47+ - path : {{ . | trimSuffix "/" }}/static/admin/
48+ backend :
49+ serviceName : {{ $fullName }}
50+ servicePort : backend-http
4051 {{- end }}
4152 {{- end }}
4253 {{- end }}
Original file line number Diff line number Diff line change @@ -8,9 +8,13 @@ metadata:
88spec :
99 type : {{ .Values.service.type }}
1010 ports :
11- - port : {{ .Values.service.port }}
11+ - port : 80
1212 targetPort : http
1313 protocol : TCP
14- name : http
14+ name : frontend-http
15+ - port : 8000
16+ targetPort : 8000
17+ protocol : TCP
18+ name : backend-http
1519 selector :
1620 {{- include "prevention-point.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ podSecurityContext: {}
4141
4242service :
4343 type : ClusterIP
44- port : 80
4544
4645ingress :
4746 enabled : false
Original file line number Diff line number Diff line change 1313echo " ==> Starting containers with docker-compose…"
1414docker-compose up -d --build
1515
16- echo
17- echo " ==> Initialize static assets"
18- docker-compose exec app python manage.py collectstatic
19-
2016echo
2117echo " ==> App is now ready to go!"
2218echo " *Open http://localhost:8080"
You can’t perform that action at this time.
0 commit comments