Commit 047ae66b authored by Florent Chehab's avatar Florent Chehab

heroku CI support added

parent 31445784
......@@ -8,7 +8,7 @@ testing:
script:
- export ENV=development
- export DATABASE_URL=postgres://postgres:@postgres:5432/python-test-app
- pip install -r requirements.txt
- pip install -r requirements.txt --quiet
- ./manage.py check
- coverage3 run manage.py test
- coverage3 report
......@@ -42,3 +42,14 @@ pages:
- master
tags:
- docker
preprod:
type: deploy
image: ruby
script:
- gem install dpl
- dpl --provider=heroku --app=outgoing-preprod --api-key=$HEROKU_API_KEY
only:
- master
tags:
- docker
\ No newline at end of file
release: python manage.py migrate
web: gunicorn general.wsgi
[![build](/../badges/master/build.svg)](https://gitlab.utc.fr/chehabfl/outgoing_rex/pipelines) [![coverage](/../badges/master/coverage.svg)](https://chehabfl.gitlab.utc.fr/outgoing_rex/) [![License](https://img.shields.io/badge/License-BSD%202--Clause-green.svg)](https://opensource.org/licenses/BSD-2-Clause)
[![build](/../badges/master/build.svg)](https://gitlab.utc.fr/chehabfl/outgoing_rex/pipelines)
[![coverage](/../badges/master/coverage.svg)](https://chehabfl.gitlab.utc.fr/outgoing_rex/)
[![License](https://img.shields.io/badge/License-BSD%202--Clause-green.svg)](https://opensource.org/licenses/BSD-2-Clause)
[![Heroku](https://heroku-badge.herokuapp.com/?app=outgoing-preprod&style=flat&svg=1)](http://outgoing-preprod.herokuapp.com/)
# Site blabla
......
......@@ -130,7 +130,10 @@ USE_TZ = True
# override DATABASE_URL set by django_heroku because it forces SSL mode locally
dev_env = os.environ['ENV'] == 'development'
try:
dev_env = os.environ['ENV'] == 'development'
except KeyError:
dev_env = False
if dev_env:
DEBUG = True
......@@ -147,16 +150,12 @@ if dev_env:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
else:
# We should be on heroku server
print("You are running in production mode")
django_heroku.settings(locals())
DEBUG = False
DEBUG = True # TODO CHANGE TO FALSE BEFORE GOING IN REAL PRODUCTION
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
{
"requires": true,
"name": "outgoing_rex",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"leaflet": {
"version": "1.3.1",
......
{
"name": "outgoing_rex",
"version": "1.0.0",
"description": "[![build](/../badges/master/build.svg)](https://gitlab.utc.fr/chehabfl/outgoing_rex/pipelines) [![coverage](/../badges/master/coverage.svg)](https://chehabfl.gitlab.utc.fr/outgoing_rex/) [![License](https://img.shields.io/badge/License-BSD%202--Clause-green.svg)](https://opensource.org/licenses/BSD-2-Clause)",
"main": "manage.py",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@gitlab.utc.fr:chehabfl/outgoing_rex.git"
},
"author": "",
"license": "ISC",
"dependencies": {
"leaflet": "^1.3.1",
"leaflet.markercluster": "^1.3.0"
}
}
#OutGoing_REX
Django==2.0.3
django_heroku==0.3.1
gunicorn==19.7.1
psycopg2-binary==2.7.4
git+https://github.com/mingchen/django-cas-ng.git@23e755c61d58c957a056c7a321272ab5888797a9#egg=django-cas-ng
Pillow==5.0.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment