V1.30.9 env settings fixes
This commit is contained in:
parent
3330e6ea77
commit
70f207209f
@ -23,7 +23,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|||||||
COPY uwsgi_params /var/www/aitrainer.info/
|
COPY uwsgi_params /var/www/aitrainer.info/
|
||||||
COPY .key ./
|
COPY .key ./
|
||||||
ENV DJANGO_KEY="9ö2345iőjfdsasd9ukjhlkdf9hg"
|
ENV DJANGO_KEY="9ö2345iőjfdsasd9ukjhlkdf9hg"
|
||||||
ENV GOOGLE_APPLICATION_CREDENTIALS="/aitrainer_backoffice/aitrainer_backoffice/aitrainer_backoffice/asset/aitrainer-firebase-adminsdk.json"
|
ENV GOOGLE_APPLICATION_CREDENTIALS=/aitrainer_backoffice/aitrainer_backoffice/aitrainer_backoffice/asset/aitrainer-firebase-adminsdk.json
|
||||||
|
|
||||||
ENV PORT=8000
|
ENV PORT=8000
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import datetime
|
import datetime
|
||||||
|
import os
|
||||||
from firebase_admin import messaging, initialize_app, exceptions
|
from firebase_admin import messaging, initialize_app, exceptions
|
||||||
|
|
||||||
class FCM:
|
class FCM:
|
||||||
@ -8,6 +9,8 @@ class FCM:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
# To learn more, visit the docs here:
|
# To learn more, visit the docs here:
|
||||||
# https://cloud.google.com/docs/authentication/getting-started>
|
# https://cloud.google.com/docs/authentication/getting-started>
|
||||||
|
env = os.environ['GOOGLE_APPLICATION_CREDENTIALS']
|
||||||
|
print(f'ENV: {env}')
|
||||||
default_app = initialize_app()
|
default_app = initialize_app()
|
||||||
|
|
||||||
def send_to_multiple_token(self, title, body, registration_token, image_url = None):
|
def send_to_multiple_token(self, title, body, registration_token, image_url = None):
|
||||||
|
@ -29,7 +29,7 @@ class NotificationHistory(models.Model):
|
|||||||
notification = models.ForeignKey(Notification, on_delete=models.CASCADE)
|
notification = models.ForeignKey(Notification, on_delete=models.CASCADE)
|
||||||
customer = models.ForeignKey(Customer, on_delete=models.CASCADE)
|
customer = models.ForeignKey(Customer, on_delete=models.CASCADE)
|
||||||
response = models.CharField(max_length=255)
|
response = models.CharField(max_length=255)
|
||||||
notification_date = models.DateField(blank=True, null=True)
|
notification_date = models.DateTimeField(blank=True, null=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = 'notification_history'
|
db_table = 'notification_history'
|
||||||
|
@ -15,6 +15,8 @@ services:
|
|||||||
- mysql-server
|
- mysql-server
|
||||||
ports:
|
ports:
|
||||||
- "8002:8000"
|
- "8002:8000"
|
||||||
|
environment:
|
||||||
|
- GOOGLE_APPLICATION_CREDENTIALS=/aitrainer_backoffice/aitrainer_backoffice/aitrainer_backoffice/asset/aitrainer-firebase-adminsdk.json
|
||||||
command: gunicorn aitrainer_backoffice.aitrainer_backoffice.wsgi --env DJANGO_SETTINGS_MODULE=aitrainer_backoffice.aitrainer_backoffice.settings.prod --bind 0.0.0.0:8000 --workers 3
|
command: gunicorn aitrainer_backoffice.aitrainer_backoffice.wsgi --env DJANGO_SETTINGS_MODULE=aitrainer_backoffice.aitrainer_backoffice.settings.prod --bind 0.0.0.0:8000 --workers 3
|
||||||
|
|
||||||
mysql-server:
|
mysql-server:
|
||||||
|
Loading…
Reference in New Issue
Block a user