# pip install -U https://forge.ircam.fr/p/django-eve/source/download/dev/
# pip install https://forge.ircam.fr/p/django-prestashop/source/download/master/ --src /srv/lib
# pip install -U https://github.com/stephenmcd/grappelli-safe/archive/dynamic_stacked.zip
-pip install django-querysetsequence==0.6.1 django==1.9.11
-#pip install django-autocomplete-light django-querysetsequence
-#/usr/bin/yes | pip uninstall django-orderable
+# pip install django-querysetsequence==0.6.1 django==1.9.11
+# pip install django-autocomplete-light django-querysetsequence
+# /usr/bin/yes | pip uninstall django-orderable
chown -R $uid:$gid $media
sh $app/bin/wait.sh
# django setup
+python $manage migrate
python $manage wait-for-db
# python $manage migrate --noinput
# python $manage bower_install -- --allow-root
python $manage create-admin-user
+python $manage create-default-organization
+
# @todo searching every fixtures file in each folder
python $manage loaddata $app/organization/job/fixtures/organization-job.json
python $manage loaddata $app/organization/projects/fixtures/organization-projects-repositorysystems.json
SECRET_KEY = "j1qa@u$5ktqr^0_kwh@-j@*-80t$)ht!4-=ybz1xc%@3+r(r&tzefoih"
NEVERCACHE_KEY = "m)u^%r@uh#r3wu0&$=#$1ogx)uy4hv93^2lt%c3@xi=^gifoj8paozijdihazefd"
-DATABASE_ROUTERS = ['eve.routers.EveRouter', 'prestashop.routers.PrestaRouter']
-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
},
}
-if os.environ.get('EVEDB_ENV_POSTGRES_PASSWORD'):
- DATABASES['eve'] = {
- 'ENGINE': 'django.db.backends.postgresql_psycopg2',
- 'NAME': 'eve',
- 'USER': 'eve',
- 'PASSWORD': os.environ.get('EVEDB_ENV_POSTGRES_PASSWORD'),
- 'HOST': 'evedb',
- 'PORT': '5432',
- }
-
-if os.environ.get('PRESTADB_ENV_MYSQL_PASSWORD'):
- DATABASES['prestashop'] = {
- 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
- 'USER': 'ircam_shops', # Not used with sqlite3.
- 'PASSWORD': os.environ.get('PRESTADB_ENV_MYSQL_PASSWORD'), # Not used with sqlite3.
- 'NAME': 'ircam_shops',
- 'HOST': 'prestadb', # Set to empty string for localhost. Not used with sqlite3.
- 'PORT': '3306', # Set to empty string for default. Not used with sqlite3.
- }
-
-
# EXTENSIONS AND FORMATS
# Allowed Extensions for File Upload. Lower case is important.
FILEBROWSER_EXTENSIONS = {
--- /dev/null
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2016-2017 Ircam
+# Copyright (c) 2016-2017 Guillaume Pellerin
+# Copyright (c) 2016-2017 Emilie Zawadzki
+
+# This file is part of mezzanine-organization.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from optparse import make_option
+from django.conf import settings
+from django.core.management.base import BaseCommand, CommandError
+from django.contrib.auth.models import User
+from organization.network.models import Organization
+
+
+class Command(BaseCommand):
+ help = "Create a default organization if it doesn't exist."
+
+ name = 'Default Organization'
+
+ def handle(self, *args, **options):
+ organizations = Organization.objects.filter(is_host=True)
+ if not organizations:
+ organization = Organization(name=self.name, is_host=True)
+ organization.save()
+ print('Default organization created')
nginx:
image: nginx
ports:
- - "8020:80"
+ - "10020:80"
volumes:
- ./etc/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
volumes_from:
+++ /dev/null
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2015 Guillaume Pellerin <guillaume.pellerin@ircam.fr>
-
-# Manifeste is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-
-# Manifeste is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with Manifeste. If not, see <http://www.gnu.org/licenses/>.
-
-# Authors:
-# Guillaume Pellerin <guillaume.pellerin@ircam.fr>
-
-
-evedb:
- image: postgres:9.5
- volumes_from:
- - var
- volumes:
- - ./data/external/eve/postgresql/data/:/var/lib/postgresql/data
- environment:
- - POSTGRES_USER=eve
- - POSTGRES_DB=eve
- - POSTGRES_PASSWORD=q2nqzt0WGnwWé,256
-
-app:
- links:
- - db
- - evedb
+++ /dev/null
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2015 Guillaume Pellerin <guillaume.pellerin@ircam.fr>
-
-# Manifeste is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-
-# Manifeste is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with Manifeste. If not, see <http://www.gnu.org/licenses/>.
-
-# Authors:
-# Guillaume Pellerin <guillaume.pellerin@ircam.fr>
-
-
-prestadb:
- image: mariadb
- volumes_from:
- - var
- volumes:
- - ./data/external/prestashop/mysql/:/var/lib/mysql
- environment:
- - MYSQL_ROOT_PASSWORD=mysecretpassword
- - MYSQL_DATABASE=ircam_shops
- - MYSQL_USER=ircam_shops
- - MYSQL_PASSWORD=pUmt97e4MgR9EP4knyWea0n
-
-app:
- links:
- - db
- - prestadb