Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8404d43222 | ||
|
|
f31106dd29 | ||
|
|
fbd8b0e2a7 | ||
|
|
b04ef5a579 | ||
|
|
e01bf28646 | ||
|
|
f362194c5e | ||
|
|
bdc4c90705 | ||
|
|
b309e5fa4a | ||
|
|
a6127703e9 |
@@ -28,7 +28,7 @@ test:
|
||||
name: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- python manage.py test
|
||||
- venv/bin/python manage.py test
|
||||
|
||||
deploy:
|
||||
only:
|
||||
|
||||
11
Dockerfile
11
Dockerfile
@@ -6,6 +6,13 @@ COPY api api
|
||||
COPY ui ui
|
||||
COPY manage.py manage.py
|
||||
COPY requirements.txt requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
CMD ["gunicorn","-b",":8000", "-w", "4", "config.wsgi"]
|
||||
RUN useradd -ms /bin/bash django
|
||||
RUN chown -R django .
|
||||
|
||||
USER django
|
||||
RUN python -m venv venv
|
||||
RUN venv/bin/pip install -r requirements.txt
|
||||
RUN venv/bin/python manage.py collectstatic
|
||||
|
||||
CMD ["venv/bin/gunicorn","-b",":8000", "-w", "4", "config.wsgi"]
|
||||
5
README.md
Normal file
5
README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# CI Builder
|
||||
|
||||
My CI testing pipeline for a django project.
|
||||
|
||||
[](http://gitlab.ducoterra.net/ducoterra/ci_builder/-/commits/master)
|
||||
@@ -23,7 +23,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
SECRET_KEY = 'b8fi9=f-qj=@-#1iru34-f@a6pzfysgrf(1n_&d=ur%!1w$q*w'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
DEBUG = True if os.getenv("DEBUG") == "True" else False
|
||||
|
||||
ALLOWED_HOSTS = ["localhost", "test.ducoterra.net"]
|
||||
|
||||
@@ -122,3 +122,4 @@ USE_TZ = True
|
||||
# https://docs.djangoproject.com/en/3.0/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
||||
@@ -15,4 +15,40 @@ spec:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: test
|
||||
servicePort: 8000
|
||||
servicePort: 8000
|
||||
|
||||
---
|
||||
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: test-external-tls
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls:
|
||||
secretName: letsencrypt
|
||||
routes:
|
||||
- match: Host(`test.ducoterra.net`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: test
|
||||
port: 8000
|
||||
|
||||
---
|
||||
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: test-external-web
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: Host(`test.ducoterra.net`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: test
|
||||
port: 8000
|
||||
middlewares:
|
||||
- name: httpsredirect
|
||||
Reference in New Issue
Block a user