Skip to content
Snippets Groups Projects
Commit f44ae0c3 authored by David Schmitz's avatar David Schmitz
Browse files

Merge remote-tracking branch 'remotes/geant/master' into v1.5

parents 1d6a972f bf875f2b
No related branches found
No related tags found
No related merge requests found
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "centos/7"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 8000, host: 8000
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
config.vm.provision "shell", inline: <<-SHELL
yum install -y python-virtualenv vim git gcc libevent-devel libxml2-devel libxslt-devel mariadb-server mysql-devel patch
rpm -Uh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y beanstalkd
systemctl enable beanstalkd.service
service beanstalkd start
systemctl enable mariadb.service
service mariadb start
mysql -u root <<-SCRIPT
create database fod;
SCRIPT
mkdir -p /var/log/fod
virtualenv venv
(
source venv/bin/activate
cd ~vagrant/sync
(
cd flowspy
cp -f settings.py.dist settings.py
patch settings.py < settings.py.patch
)
pip install -r requirements.txt
sed -i 's/from django.forms.util import smart_unicode/from django.utils.encoding import smart_unicode/' ~vagrant/venv/lib/python2.7/site-packages/tinymce/widgets.py
./manage.py syncdb --noinput
./manage.py migrate
)
echo "To activate virualenv: source ~vagrant/venv/bin/activate"
echo "To create a user run: cd ~vagrant/sync; ./manage.py createsuperuser"
echo "To start flowspy server: cd ~vagrant/sync; ./manage.py runserver 0.0.0.0:8000"
echo "To start celeryd: cd ~vagrant/sync; ./manage.py celeryd"
SHELL
end
--- flowspy/settings.py.dist 2017-01-10 01:41:37.073048014 +0100
+++ flowspy/settings.py 2017-01-11 23:02:48.178847119 +0100
@@ -30,7 +30,7 @@
djcelery.setup_loader()
from celery.schedules import crontab
-DEBUG = False
+DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
@@ -51,8 +51,8 @@
DATABASES = {
'default': {
- 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': '',
+ 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME': 'example-data',
'USER': '',
'PASSWORD': '',
'HOST': '', # Set to empty string for localhost.
@@ -94,7 +94,9 @@
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True
-STATIC_ROOT = os.path.join(BASE_DIR, 'static')
+PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
+STATIC_ROOT = os.path.join(BASE_DIR)
+STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), )
STATIC_URL = '/static/'
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
@@ -137,7 +139,7 @@
WSGI_APPLICATION = 'flowspy.wsgi.application'
AUTHENTICATION_BACKENDS = (
- 'djangobackends.shibauthBackend.shibauthBackend',
+ #'djangobackends.shibauthBackend.shibauthBackend',
'django.contrib.auth.backends.ModelBackend',
)
@@ -170,25 +172,20 @@
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
- 'filters': {
- 'require_debug_false': {
- '()': 'django.utils.log.RequireDebugFalse'
- }
- },
'handlers': {
- 'mail_admins': {
- 'level': 'ERROR',
- 'filters': ['require_debug_false'],
- 'class': 'django.utils.log.AdminEmailHandler'
- }
+ 'file': {
+ 'level': 'DEBUG',
+ 'class': 'logging.FileHandler',
+ 'filename': 'debug.log',
+ },
},
'loggers': {
- 'django.request': {
- 'handlers': ['mail_admins'],
- 'level': 'ERROR',
+ 'django': {
+ 'handlers': ['file'],
+ 'level': 'DEBUG',
'propagate': True,
},
- }
+ },
}
LOGIN_URL = '/welcome'
...@@ -4,6 +4,8 @@ argparse==1.2.1 ...@@ -4,6 +4,8 @@ argparse==1.2.1
celery==2.5.3 celery==2.5.3
cl==0.0.3 cl==0.0.3
django-celery==2.5.5 django-celery==2.5.5
django-admin==1.0.2
django-form-utils==1.0.3
django-picklefield==0.2.1 django-picklefield==0.2.1
django-registration==0.8 django-registration==0.8
djangorestframework==2.3.14 djangorestframework==2.3.14
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment