Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
c874d397
Commit
c874d397
authored
Mar 28, 2016
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADMIN] Files for install, Docker is almost ok, need some tests.
parent
e5bc8728
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
64 deletions
+58
-64
rest.py
graphExplorer/rest.py
+2
-1
Dockerfile
install/Dockerfile
+55
-62
requirements.txt
install/requirements.txt
+1
-1
No files found.
graphExplorer/rest.py
View file @
c874d397
from
gargantext.util.http
import
APIView
,
APIException
,
JsonHttpResponse
from
gargantext.util.http
import
APIView
,
APIException
,
JsonHttpResponse
,
requires_auth
#from rest_framework.authentication import SessionAuthentication, BasicAuthentication
from
gargantext.util.db
import
session
...
...
@@ -10,6 +10,7 @@ from graphExplorer.functions import get_cooc
class
Graph
(
APIView
):
#authentication_classes = (SessionAuthentication, BasicAuthentication)
#@requires_auth
def
get
(
self
,
request
,
project_id
,
corpus_id
):
'''
Graph.get :: Get graph data as REST api.
...
...
install/Dockerfile
View file @
c874d397
FROM
debian:stretch
#
FROM gargantext
MAINTAINER
ISCPIF <alexandre.delanoe@iscpif.fr>
#
FROM debian:stretch
FROM
gargantext
#
MAINTAINER ISCPIF <alexandre.delanoe@iscpif.fr>
#
## Install docker.io
## Install sudo
## wget http://dl.gargantext.
## cd /srv/gargantext/install
## sudo docker build -t gargantext .
#
RUN
apt-get update
&&
\
apt-get
install
-y
aptitude
\
apt-utils ca-certificates locales
\
sudo
gcc wget git postgresql-9.5 vim
# docker run -i -t gargantext /bin/bash
# Configure timezone and locale
USER
root
RUN
echo
"Europe/Paris"
>
/etc/timezone
&&
\
dpkg-reconfigure
-f
noninteractive tzdata
&&
\
sed
-i
-e
's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/'
/etc/locale.gen
&&
\
sed
-i
-e
's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/'
/etc/locale.gen
&&
\
echo
'LANG="fr_FR.UTF-8"'
>
/etc/default/locale
&&
\
dpkg-reconfigure
--frontend
=
noninteractive locales
&&
\
update-locale
LANG
=
fr_FR.UTF-8
RUN
apt-get update
\
&&
apt-get
install
-y
postgresql-server-dev-9.5
\
libpq-dev libxml2 libxml2-dev xml-core libgfortran-5-dev
# CREATE USER and adding it to sudo
RUN
adduser
--disabled-password
--gecos
""
gargantua
RUN
apt-get
install
-y
sudo
&&
adduser gargantua
sudo
\
&&
echo
'%sudo ALL=(ALL) NOPASSWD:ALL'
>>
/etc/sudoers
# RUN apt-get update && \
# apt-get install -y \
# apt-utils ca-certificates locales \
# sudo aptitude gcc wget git postgresql-9.5 vim
#
# ## Configure timezone and locale
# RUN echo "Europe/Paris" > /etc/timezone && \
# dpkg-reconfigure -f noninteractive tzdata && \
# sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
# sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \
# echo 'LANG="fr_FR.UTF-8"' > /etc/default/locale && \
# dpkg-reconfigure --frontend=noninteractive locales && \
# update-locale LANG=fr_FR.UTF-8
#
#
# RUN apt-get update \
# && apt-get install -y postgresql-server-dev-9.5 \
# libpq-dev libxml2 libxml2-dev xml-core libgfortran-5-dev
#
# # PROD VERSION OF GARGANTEXt
# # RUN apt-get install uwsgi nginx
#
#
# ## CREATE USER and adding it to sudo
# ## TODO ask user for password
# RUN adduser --disabled-password --gecos "" gargantua
# RUN apt-get install -y sudo && adduser gargantua sudo \
# && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
#
# # Python dependencies
# # (installing Debian version before pip to get dependencies)
# # TODO: update it with requirements.txt
# RUN apt-get update && apt-get install -y \
# virtualenv python3-virtualenv \
# python3.4 python3.4-dev \
# python3.5 python3.5-dev \
# python3-six python3-numpy
#
# # Installing pip version of python libs
WORKDIR
/home/gargantua
RUN
wget http://dl.delanoe.org/debian.txt
\
&&
apt-get update
&&
dpkg
--set-selections
< debian.txt
\
&&
apt-get dselect-upgrade
\
&&
/bin/bash
-c
'source /home/gargantua/env_3-5/bin/activate'
\
&&
/bin/bash
-c
\
'/home/gargantua/env_3-5/bin/pip install -r
\
/home/gargantua/requirements.txt'
#RUN apt-get update && apt-get install -y \
# virtualenv python3-virtualenv \
# python3.4 python3.4-dev \
# python3.5 python3.5-dev \
# && wget http://dl.delanoe.org/requirements.txt \
# FIXME : pip install -r all requirements does not work, need to split the list
#RUN wget http://dl.delanoe.org/requirements.txt \
# && /usr/bin/virtualenv --py=/usr/bin/python3.5 env_3-5 \
# && /bin/bash -c 'source env_3-5/bin/activate' \
# && /bin/bash -c 'env_3-5/bin/pip install git+https://github.com/zzzeek/sqlalchemy.git@rel_1_1' \
# && /bin/bash -c 'env_3-5/bin/pip install -r requirements.txt'
#
#
# chown gargantua
#
#
## CONFIGURE POSTGRESQL
#
...
...
@@ -65,26 +72,17 @@ RUN wget http://dl.delanoe.org/debian.txt \
#VOLUME ["/home/gargantua","/data/gargantext"]
## INSTALL MAIN DEPENDENCIES
#
#USER gargantua
#WORKDIR /home/gargantua
#RUN /usr/bin/virtualenv --py=/usr/bin/python3.4 env_3-4
#RUN wget http://dl.delanoe.org/requirements.txt &&\
# /usr/bin/virtualenv --py=/usr/bin/python3.5 env_3-5 &&\
# source env_3-5/bin/activate &&\
# pip install -R requirements.txt
#
#WORKDIR /srv
#RUN mkdir -p gargantext
# configure postgres here
# OK
#
USER postgres
#
RUN /etc/init.d/postgresql start &&\
#
psql -c "CREATE user gargantua WITH PASSWORD 'C8kdcUrAQy66U'" &&\
#
createdb -O gargantua gargandb
USER
postgres
RUN
/etc/init.d/postgresql start
&&
\
psql -c "CREATE user gargantua WITH PASSWORD 'C8kdcUrAQy66U'" &&\
createdb -O gargantua gargandb
# GET CONFIG FILES
...
...
@@ -93,8 +91,6 @@ RUN wget http://dl.delanoe.org/debian.txt \
#RUN cd /srv/ && git clone https://gogs.iscpif.fr/gargantext.git
# script pour peupler la base
# mount /srv
...
...
@@ -113,6 +109,3 @@ RUN wget http://dl.delanoe.org/debian.txt \
# ENTRYPOINT /etc/init.d/postgresql start
install/requirements.txt
View file @
c874d397
...
...
@@ -21,10 +21,10 @@ python-dateutil==2.4.2
pytz==2015.7 # timezones
PyYAML==3.11
RandomWords==0.1.12
six==1.10.0
SQLAlchemy==1.1.0b1.dev0
ujson==1.35
umalqurra==0.2 # arabic calendars (?? why use ??)
wheel==0.29.0
pandas==0.18.0
networkx==1.11
six==1.10.0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment