Skip to content

Commit

Permalink
fix: revert deployment to working settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ngurenyaga committed Jul 14, 2021
1 parent fcfd6f9 commit f6467f5
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ steps:
'--platform', 'managed',
'--allow-unauthenticated',
'--add-cloudsql-instances', '${_CLOUDSQL_INSTANCE_CONNECTION_NAME}',
'--update-env-vars', 'GOOGLE_CLOUD_PROJECT=$PROJECT_ID,SETTINGS_NAME=mle_django_settings'
'--set-env-vars', 'GOOGLE_CLOUD_PROJECT=$PROJECT_ID,SETTINGS_NAME=mle_django_settings',
'--min-instances', '1'
]

images:
Expand Down
2 changes: 1 addition & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"USER": env.str("POSTGRES_USER"),
"PASSWORD": env.str("POSTGRES_PASSWORD"),
"HOST": env.str("POSTGRES_HOST"),
"PORT": env.str("POSTGRES_PORT"),
"PORT": env.str("POSTGRES_PORT", None),
"ENGINE": "django.db.backends.postgresql",
"ATOMIC_REQUESTS": True,
}
Expand Down
6 changes: 5 additions & 1 deletion config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
SECRET_KEY = env("DJANGO_SECRET_KEY")
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = env.list(
"DJANGO_ALLOWED_HOSTS", default=["savannahghi.org,mle.savannahghi.org,run.app"]
"DJANGO_ALLOWED_HOSTS",
default=[
".savannahghi.org",
"mle.savannahghi.org",
],
)

# DATABASES
Expand Down
15 changes: 15 additions & 0 deletions pepfar_mle/common/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from django.contrib import admin

from .models import Facility, FacilityAttachment


class FacilityAdmin(admin.ModelAdmin):
pass


class FacilityAttachmentAdmin(admin.ModelAdmin):
pass


admin.site.register(Facility, FacilityAdmin)
admin.site.register(FacilityAttachment, FacilityAttachmentAdmin)
18 changes: 18 additions & 0 deletions pepfar_mle/common/migrations/0002_auto_20210714_0824.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.1.12 on 2021-07-14 05:24

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('common', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='facilityattachment',
name='content_type',
field=models.CharField(choices=[('image/png', 'PNG'), ('image/jpeg', 'JPEG'), ('application/pdf', 'PDF'), ('application/vnd.ms-excel', 'xlsx'), ('application/msword', 'doc'), ('application/vnd.openxmlformats-officedocument.wordprocessingml.document.docx', 'docx'), ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx'), ('text/plain', 'text')], max_length=100),
),
]

0 comments on commit f6467f5

Please sign in to comment.