This commit is contained in:
Jakub Kaniecki 2025-03-30 14:55:31 +02:00
parent 4df1d9f9a6
commit e5cf69f08f
3 changed files with 110 additions and 0 deletions

37
.dockerignore Normal file
View File

@ -0,0 +1,37 @@
# Dependencies
node_modules
npm-debug.log
yarn-debug.log
yarn-error.log
# Build output
dist
dist-ssr
build
# Version control
.git
.gitignore
# Environment files
.env
.env.local
.env.*.local
# IDE and editor files
.idea
.vscode
*.swp
*.swo
.DS_Store
# Test files
coverage
.nyc_output
# Misc
README.md
.drone.yaml
k8s/
backend/
*.log

39
.drone.yaml Normal file
View File

@ -0,0 +1,39 @@
kind: pipeline
type: exec
name: default
steps:
- name: build-frontend
commands:
- docker build --no-cache -t knck-frontend:latest .
- docker tag knck-frontend:latest registry.knck.pl:5000/knck-frontend:latest
- docker push registry.knck.pl:5000/knck-frontend:latest
- name: build-backend
commands:
- docker build --no-cache -t knck-backend:latest ./backend
- docker tag knck-backend:latest registry.knck.pl:5000/knck-backend:latest
- docker push registry.knck.pl:5000/knck-backend:latest
- name: delete
environment:
KUBECONFIG: /home/drone-runner/drone-kubeconfig
commands:
- kubectl delete deployment knck-app || true
- name: deploy
environment:
KUBECONFIG: /home/drone-runner/drone-kubeconfig
commands:
- kubectl apply -f k8s/combined-deployment.yaml --insecure-skip-tls-verify
- kubectl apply -f k8s/combined-service.yaml --insecure-skip-tls-verify
- kubectl apply -f k8s/combined-ingress.yaml --insecure-skip-tls-verify
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock
trigger:
branch:
- main

34
backend/.dockerignore Normal file
View File

@ -0,0 +1,34 @@
# Dependencies
node_modules
npm-debug.log
yarn-debug.log
yarn-error.log
# Environment files
.env
.env.local
.env.*.local
# Version control
.git
.gitignore
# IDE and editor files
.idea
.vscode
*.swp
*.swo
.DS_Store
# Test files
coverage
.nyc_output
# Logs
logs
*.log
# Misc
README.md
.drone.yaml
k8s/