deployment, droneci, wymagane biblioteki, readme
Some checks reported errors
continuous-integration/drone Build encountered an error
Some checks reported errors
continuous-integration/drone Build encountered an error
This commit is contained in:
parent
f4f40c35f6
commit
4fd4e36c8d
19
.drone.yml
Normal file
19
.drone.yml
Normal file
@ -0,0 +1,19 @@
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: docker:dind
|
||||
commands:
|
||||
- docker build -t izaac:latest .
|
||||
- docker tag izaac:latest registry.izaac.pl:5000/izaac:latest
|
||||
- docker push registry.izaac.pl:5000/izaac:latest
|
||||
|
||||
- name: deploy
|
||||
commands:
|
||||
- kubectl apply -f deployment.yml
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
@ -9,4 +9,8 @@ RUN pip install --upgrade pip
|
||||
COPY ./requirements.txt .
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
ENV DJANGO_SETTINGS_MODULE=izaac.settings
|
||||
|
||||
COPY . .
|
||||
|
||||
ENTRYPOINT ["gunicorn", "izaac.wsgi:application", "--bind", "0.0.0.0:8000"]
|
||||
49
deployment.yml
Normal file
49
deployment.yml
Normal file
@ -0,0 +1,49 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: izaac-deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: izaac
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: izaac
|
||||
spec:
|
||||
containers:
|
||||
- name: izaac
|
||||
image: registry.izaac.pl:5000/izaac:latest
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: izaac-svc
|
||||
spec:
|
||||
selector:
|
||||
app: izaac
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8000
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: izaac-ingress
|
||||
spec:
|
||||
rules:
|
||||
- http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: izaac-svc
|
||||
port:
|
||||
number: 80
|
||||
@ -1,12 +0,0 @@
|
||||
version: '3.11'
|
||||
|
||||
services:
|
||||
web:
|
||||
build: ./app
|
||||
command: python manage.py runserver
|
||||
volumes:
|
||||
-./app:/usr/scr/app/
|
||||
ports:
|
||||
- 8000:8000
|
||||
env_file:
|
||||
- ./.env.dev
|
||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
django
|
||||
gunicorn
|
||||
Loading…
x
Reference in New Issue
Block a user