-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(heroku): Configure settings for deployment Add Procfile for heroku deployment Add whitenoise, gunicorn, psycopg2 dependencies to requirements.txt Add whitenoise instance to wsgi Add a settings.py file Add database configurations to settings global [Finishes #157842572]
- Loading branch information
Showing
17 changed files
with
346 additions
and
25 deletions.
There are no files selected for viewing
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,4 @@ | ||
release: npm install | ||
release: python setup.py develop | ||
release: invoke bootstrap-wger --settings-path /app/settings.py --no-start-server | ||
web: gunicorn wger.wsgi:application |
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,41 @@ | ||
{ | ||
"name": "wg-rogue-one", | ||
"scripts": { | ||
}, | ||
"env": { | ||
"DISABLE_COLLECTSTATIC": { | ||
"required": true | ||
}, | ||
"WG_HOST": { | ||
"required": true | ||
}, | ||
"WG_KEY": { | ||
"required": true | ||
}, | ||
"WG_NAME": { | ||
"required": true | ||
}, | ||
"WG_PASSWORD": { | ||
"required": true | ||
}, | ||
"WG_USER": { | ||
"required": true | ||
} | ||
}, | ||
"formation": { | ||
"web": { | ||
"quantity": 1 | ||
} | ||
}, | ||
"addons": [ | ||
"heroku-postgresql" | ||
], | ||
"buildpacks": [ | ||
{ | ||
"url": "heroku/nodejs" | ||
}, | ||
{ | ||
"url": "heroku/python" | ||
} | ||
] | ||
} |
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,59 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
from wger.settings_global import * | ||
|
||
# Use 'DEBUG = True' to get more details for server errors | ||
DEBUG = True | ||
TEMPLATES[0]['OPTIONS']['debug'] = True | ||
|
||
ADMINS = ( | ||
('Your name', 'your_email@example.com'), | ||
) | ||
MANAGERS = ADMINS | ||
|
||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.postgresql', | ||
'NAME': os.environ.get('WG_NAME') or "'test_wger'", | ||
'USER': os.environ.get('WG_USER') or 'postgres', | ||
'HOST': os.environ.get('WG_HOST') or 'localhost', | ||
'PASSWORD': os.environ.get('WG_PASSWORD') or '', | ||
'PORT': os.environ.get('WG_PORT') or '', | ||
} | ||
} | ||
|
||
# Make this unique, and don't share it with anybody. | ||
SECRET_KEY = 'rh(nd%tb*7zl-*j&6h812littid0w47npbtwm1nmed6kp$wir6' | ||
|
||
# Your reCaptcha keys | ||
RECAPTCHA_PUBLIC_KEY = '' | ||
RECAPTCHA_PRIVATE_KEY = '' | ||
NOCAPTCHA = True | ||
|
||
# The site's URL (e.g. http://www.my-local-gym.com or http://localhost:8000) | ||
# This is needed for uploaded files and images (exercise images, etc.) to be | ||
# properly served. | ||
SITE_URL = 'http://localhost:8000' | ||
|
||
# Path to uploaded files | ||
# Absolute filesystem path to the directory that will hold user-uploaded files. | ||
MEDIA_ROOT = '/Users/tibzy/.local/share/wger/media' | ||
MEDIA_URL = '/media/' | ||
|
||
# Allow all hosts to access the application. Change if used in production. | ||
ALLOWED_HOSTS = '*' | ||
|
||
# This might be a good idea if you setup memcached | ||
#SESSION_ENGINE = "django.contrib.sessions.backends.cache" | ||
|
||
# Configure a real backend in production | ||
if DEBUG: | ||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | ||
|
||
# Sender address used for sent emails | ||
WGER_SETTINGS['EMAIL_FROM'] = 'wger Workout Manager <wger@example.com>' | ||
|
||
# Your twitter handle, if you have one for this instance. | ||
#WGER_SETTINGS['TWITTER'] = '' |
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,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.13 on 2018-05-30 11:12 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('config', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='languageconfig', | ||
name='item', | ||
field=models.CharField(choices=[('1', 'Exercises'), ('2', 'Ingredients')], editable=False, max_length=2), | ||
), | ||
] |
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,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.13 on 2018-05-30 11:12 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0009_auto_20160303_2340'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='license', | ||
name='full_name', | ||
field=models.CharField(help_text='If a license has been localized, e.g. the Creative Commons licenses for the different countries, add them as separate entries here.', max_length=60, verbose_name='Full name'), | ||
), | ||
] |
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,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.13 on 2018-05-30 11:12 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('email', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='log', | ||
options={'ordering': ['-date']}, | ||
), | ||
migrations.AlterField( | ||
model_name='log', | ||
name='gym', | ||
field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='email_log', to='gym.Gym'), | ||
), | ||
] |
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,45 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.13 on 2018-05-30 11:12 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('exercises', '0003_auto_20160921_2000'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='exercise', | ||
name='equipment', | ||
field=models.ManyToManyField(blank=True, to='exercises.Equipment', verbose_name='Equipment'), | ||
), | ||
migrations.AlterField( | ||
model_name='exercise', | ||
name='muscles', | ||
field=models.ManyToManyField(blank=True, to='exercises.Muscle', verbose_name='Primary muscles'), | ||
), | ||
migrations.AlterField( | ||
model_name='exercise', | ||
name='muscles_secondary', | ||
field=models.ManyToManyField(blank=True, related_name='secondary_muscles', to='exercises.Muscle', verbose_name='Secondary muscles'), | ||
), | ||
migrations.AlterField( | ||
model_name='exercise', | ||
name='status', | ||
field=models.CharField(choices=[('1', 'Pending'), ('2', 'Accepted'), ('3', 'Declined')], default='1', editable=False, max_length=2), | ||
), | ||
migrations.AlterField( | ||
model_name='exerciseimage', | ||
name='is_main', | ||
field=models.BooleanField(default=False, help_text='Tick the box if you want to set this image as the main one for the exercise (will be shown e.g. in the search). The first image is automatically marked by the system.', verbose_name='Main picture'), | ||
), | ||
migrations.AlterField( | ||
model_name='exerciseimage', | ||
name='status', | ||
field=models.CharField(choices=[('1', 'Pending'), ('2', 'Accepted'), ('3', 'Declined')], default='1', editable=False, max_length=2), | ||
), | ||
] |
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,34 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.13 on 2018-05-30 11:12 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('gym', '0006_auto_20160214_1013'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='gym', | ||
options={'ordering': ['name'], 'permissions': (('gym_trainer', 'Trainer: can see the users for a gym'), ('manage_gym', 'Admin: can manage users for a gym'), ('manage_gyms', 'Admin: can administrate the different gyms'))}, | ||
), | ||
migrations.AlterField( | ||
model_name='contract', | ||
name='options', | ||
field=models.ManyToManyField(blank=True, to='gym.ContractOption', verbose_name='Options'), | ||
), | ||
migrations.AlterField( | ||
model_name='gymadminconfig', | ||
name='overview_inactive', | ||
field=models.BooleanField(default=True, help_text='Receive email overviews of inactive members', verbose_name='Overview of inactive members'), | ||
), | ||
migrations.AlterField( | ||
model_name='gymconfig', | ||
name='weeks_inactive', | ||
field=models.PositiveIntegerField(default=4, help_text='Number of weeks since the last time a user logged his presence to be considered inactive', verbose_name='Reminder of inactive members'), | ||
), | ||
] |
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,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.13 on 2018-05-30 11:12 | ||
from __future__ import unicode_literals | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('manager', '0007_auto_20160311_2258'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='setting', | ||
name='reps', | ||
field=models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(600)], verbose_name='Amount'), | ||
), | ||
] |
Oops, something went wrong.
2b87e99
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all looks good.