-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from roniahmadi/main
update and add uv
- Loading branch information
Showing
195 changed files
with
461,733 additions
and
4,654 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
SECRET_KEY={SECRET_KEY} | ||
DB_HOST={DB_HOST} | ||
DB_NAME={DB_NAME} | ||
DB_USER={DB_USER} | ||
DB_PASSWORD={DB_PASSWORD} | ||
|
||
EMAIL_HOST={EMAIL_HOST} | ||
EMAIL_PORT={EMAIL_PORT} | ||
EMAIL_HOST_USER={EMAIL_HOST_USER} | ||
EMAIL_HOST_PASSWORD={EMAIL_HOST_PASSWORD} | ||
|
||
NPM_ENV={NPM_ENV} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ exclude = | |
manage.py | ||
settings.py | ||
env | ||
.env | ||
.env | ||
.venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Deploy to server production | ||
on: [workflow_dispatch] | ||
jobs: | ||
build: | ||
name: build-apps | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: executing remote ssh commands using password | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
port: ${{ secrets.PORT }} | ||
script: | | ||
cd /opt/GPMain | ||
git pull origin main | ||
export $(grep -v '^#' .env | xargs) | ||
/opt/geraienv/bin/python /opt/GPMain/manage.py makemigrations | ||
/opt/geraienv/bin/python /opt/GPMain/manage.py migrate | ||
echo yes | /opt/geraienv/bin/python /opt/GPMain/manage.py collectstatic | ||
service uwsgi restart | ||
service nginx restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Deploy to server test | ||
on: [workflow_dispatch] | ||
jobs: | ||
build: | ||
name: build-apps | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: executing remote ssh commands using password | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
port: ${{ secrets.PORT }} | ||
script: | | ||
cd /opt/geraipi | ||
git pull origin2 main | ||
export $(grep -v '^#' .env | xargs) | ||
/opt/geraienv/bin/python /opt/geraipi/manage.py makemigrations | ||
/opt/geraienv/bin/python /opt/geraipi/manage.py migrate | ||
echo yes | /opt/geraienv/bin/python /opt/geraipi/manage.py collectstatic | ||
service uwsgi restart | ||
service nginx restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ mysql | |
.env | ||
**/__pycache__ | ||
**/migrations | ||
# projekpi/settings.py # | ||
projekpi/settings.py | ||
media |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { initializeApp } from "firebase/app"; | ||
import { getMessaging, getToken } from "firebase/messaging"; | ||
|
||
// TODO: Replace the following with your app's Firebase project configuration | ||
// See: https://firebase.google.com/docs/web/learn-more#config-object | ||
const firebaseConfig = { | ||
apiKey: "AIzaSyCsEEl7bhST8VHrK3ovbEfMxCUcHZngKg0", | ||
authDomain: "geraipi.firebaseapp.com", | ||
projectId: "geraipi", | ||
storageBucket: "geraipi.appspot.com", | ||
messagingSenderId: "1071852496864", | ||
appId: "1:1071852496864:web:c5e8338dc67fa12d9bad85", | ||
measurementId: "G-SW3CZ09N71" | ||
}; | ||
|
||
// Initialize Firebase | ||
const app = initializeApp(firebaseConfig); | ||
|
||
|
||
// Initialize Firebase Cloud Messaging and get a reference to the service | ||
const messaging = getMessaging(app); | ||
getToken(messaging, { vapidKey: 'BFN7KQFtuiq9l_tkSE3GcS66hqmsG7ddDjL5wrpSlegQY5_YGzp1LD5F3vn74RP4skldx5A_7k9DQuswI5zYUEs' }).then((currentToken) => { | ||
if (currentToken) { | ||
// Send the token to your server and update the UI if necessary | ||
// ... | ||
console.log("token") | ||
} else { | ||
console.log('No registration token available. Request permission to generate one.'); | ||
} | ||
}).catch((err) => { | ||
console.log('An error occurred while retrieving token. ', err); | ||
// ... | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { initializeApp } from "firebase/app"; | ||
import { getMessaging } from "firebase/messaging/sw"; | ||
import { onBackgroundMessage } from "firebase/messaging/sw"; | ||
|
||
const firebaseConfig = { | ||
apiKey: "AIzaSyCsEEl7bhST8VHrK3ovbEfMxCUcHZngKg0", | ||
authDomain: "geraipi.firebaseapp.com", | ||
projectId: "geraipi", | ||
storageBucket: "geraipi.appspot.com", | ||
messagingSenderId: "1071852496864", | ||
appId: "1:1071852496864:web:c5e8338dc67fa12d9bad85", | ||
measurementId: "G-SW3CZ09N71" | ||
}; | ||
|
||
const app = initializeApp(firebaseConfig); | ||
|
||
const messaging = getMessaging(app); | ||
onBackgroundMessage(messaging, (payload) => { | ||
console.log('[firebase-messaging-sw.js] Received background message ', payload); | ||
// Customize notification here | ||
const notificationTitle = 'Background Message Title'; | ||
const notificationOptions = { | ||
body: 'Background Message body.', | ||
icon: '/firebase-logo.png' | ||
}; | ||
|
||
self.registration.showNotification(notificationTitle, notificationOptions); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
presets: ['@babel/preset-env', '@babel/preset-react'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"model": "frontend.banner", "pk": 1, "fields": {"name": "Image01", "image": "image_banner/Banner01_TdjEAEI.jpg"}}, {"model": "frontend.banner", "pk": 2, "fields": {"name": "Image2", "image": "image_banner/Banner2_VQNjzOj.jpg"}}] |
Oops, something went wrong.