This commit is contained in:
@@ -29,4 +29,18 @@ jobs:
|
||||
push: true
|
||||
tags: |
|
||||
satitprompunjai/lms-backend:latest
|
||||
satitprompunjai/lms-backend:${{ gitea.sha }}
|
||||
satitprompunjai/lms-backend:${{ gitea.sha }}
|
||||
|
||||
- name: Update image tag in lms-k8s
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GIT_TOKEN }}
|
||||
run: |
|
||||
git clone https://$GIT_TOKEN@gitea.panmodel.com/admin/lms-k8s.git
|
||||
cd lms-k8s
|
||||
|
||||
sed -i "s|satitprompunjai/lms-backend:.*|satitprompunjai/lms-backend:${{ github.sha }}|g" apps/backend/deployment.yaml
|
||||
|
||||
git config user.name "lms-backend-ci"
|
||||
git config user.email "ci@panmodel.com"
|
||||
git commit -am "chore: update lms-backend image to ${{ github.sha }}"
|
||||
git push
|
||||
|
||||
@@ -11,6 +11,7 @@ ENV/
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
/staticfiles/ # ไม่เก็บไฟล์ที่รวบรวมแล้ว (เพราะเราจะรัน collectstatic ใน Docker)
|
||||
staticfiles/
|
||||
/media/
|
||||
.env
|
||||
|
||||
|
||||
+3
-3
@@ -92,11 +92,11 @@ WSGI_APPLICATION = 'core.wsgi.application'
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql', # เปลี่ยนจาก django_cockroachdb
|
||||
'NAME': os.environ.get('DB_NAME', 'my_db'),
|
||||
'NAME': os.environ.get('DB_NAME', 'lms'),
|
||||
'HOST': os.environ.get('DB_HOST', 'localhost'),
|
||||
'PORT': os.environ.get('DB_PORT', '5432'), # พอร์ตมาตรฐาน PostgreSQL
|
||||
'USER': os.environ.get('DB_USER', 'user'),
|
||||
'PASSWORD': os.environ.get('DB_PASSWORD', 'password'),
|
||||
'USER': os.environ.get('DB_USER', 'lms'),
|
||||
'PASSWORD': os.environ.get('DB_PASSWORD', 'lms123'),
|
||||
'OPTIONS': {
|
||||
'connect_timeout': 5,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user