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
e87b2f5a
Commit
e87b2f5a
authored
Jul 25, 2016
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[INSTALL] Docker install.
parent
94d3f771
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
85 additions
and
62 deletions
+85
-62
01-setup
install/01-setup
+11
-10
02-config
install/02-config
+7
-17
03-run
install/03-run
+4
-4
README.md
install/README.md
+38
-0
Dockerfile
install/gargamelle/Dockerfile
+3
-5
django_configure.sh
install/gargamelle/django_configure.sh
+14
-8
psql_configure.sh
install/gargamelle/psql_configure.sh
+8
-16
requirements.txt
install/gargamelle/requirements.txt
+0
-2
No files found.
install/01-setup
View file @
e87b2f5a
```
#!bin/bash
#!/bin/bash
#name:01-setup
#TODO clone the repo into /srv/gargantext/ and reduce the different steps
#git clone ssh://gitolite@delanoe.org:1979/gargantext /srv/gargantext \
# && cd /srv/gargantext \
# && git fetch origin stable \
# && git checkout stable \
echo
"****************SETUP**************************"
;
for
dir
in
"/srv/gargantext_lib"
"/srv/gargantext_static"
"/srv/gargantext_media"
;
do
sudo mkdir
-p
$dir
;
sudo chown
gargantua:gargantua
$dir
;
done
;
sudo wget http://dl.gargantext.org/gargantext_lib.tar.bz2 \
&& sudo tar xvjf gargantext_lib.tar.bz2 -o /srv/gargantext_lib \
#here gargantext_lib.tar.bz2 inside this directory
#sudo wget http://dl.gargantext.org/gargantext_lib.tar.bz2 && \
sudo tar
xvjf gargantext_lib.tar.bz2
-o
/srv/gargantext_lib
\
&&
sudo chown
-R
gargantua:gargantua /srv/gargantext_lib
\
&&
echo
":::::::::::::::::Done::::::::::::::::::::::::::"
;
#TODO clone the repo into /srv/gargantext/ and reduce the different steps
#git clone ssh://gitolite@delanoe.org:1979/gargantext /srv/gargantext \
# && cd /srv/gargantext \
# && git fetch origin stable \
# && git checkout stable \
```
install/02-config
View file @
e87b2f5a
#!/bin/bash
#configure the base image gargamelle
echo
'****************BUILD**********************************'
docker build
-t
gargamelle:latest ./gargamelle
#echo '::::: BUILD :::::'
#2 option with this image:
# configure the container
# run the image with the app in it
echo
'::::::::::::::::::::GARGAMELLE IMAGE BUILT:::::::::::::'
echo
'*************CONFIG************************************'
sudo
docker build
-t
gargamelle:latest ./gargamelle
sudo
docker run
\
-v
/srv/:/srv/
\
-p
8000
\
-p
5432
\
-it
gargamelle:latest
\
/bin/bash
-c
"/srv/gargantext/install/gargamelle/psql_configure.sh"
echo
'::::: CONFIG :::::'
sudo
docker
rm
-f
`
docker ps
-a
|
grep
-v
CONTAINER |
awk
'{print $1 }'
`
sudo
docker run
\
-v
/srv/:/srv/
\
-p
8000
\
-p
8000
:8000
\
-p
5432
\
-it
gargamelle:latest
\
/bin/bash
-c
"/srv/gargantext/install/gargamelle/django_configure.sh"
/bin/bash
-c
"./psql_configure.sh; ./django_configure.sh ; exit"
sudo
docker
rm
-f
`
docker ps
-a
|
grep
-v
CONTAINER |
awk
'{print $1 }'
`
sudo
docker
rm
-f
`
docker ps
-a
|
grep
-v
CONTAINER
awk
'{print $1 }'
`
install/03-run
View file @
e87b2f5a
#!/bin/bash
sudo
docker run
\
-v
/srv/:/srv/
\
-p
8000
\
-p
8000
:8000
\
-p
5432
\
-it
gargamelle:latest
\
# /bin/bash -c "service postgresql start; su gargantua -c \'source /env_3-5/bin/activate && /srv/gargantext/manage.py runserver 0.0.0.0:8000\'"
/bin/bash
-c
"service postgresql start; /bin/su gargantua -c 'source /env_3-5/bin/activate && /srv/gargantext/manage.py runserver 0.0.0.0:8000'"
sudo
docker
rm
-f
`
docker ps
-a
|
grep
-v
CONTAINER |
awk
'{print $1 }'
`
install/README.md
View file @
e87b2f5a
# Install
Gargamelle is a developpement environemment to install configure and run Gargantext plateform.
## Prerequisites
*
MaC or Debian based OS
*
Git
*
Docker engine
## Installation Procedure
*
Clone the repository
If you want to contribute see our
[
git workflow procedure
](
../tools/git.md
)
clone the repo and switch to your own branch named with username-branchname such as username-unstable for example
Inside the repository (install)
you will find the setup config and run procedure files
cd gargantext/install/
```
./01-setup
./02-config #here you will have to choose a username & a password for gargantext
./03-run
```
Open your browser Chrome perferably at localhost:8000
click into enter and login!
Enjoy ;)!
install/gargamelle/Dockerfile
View file @
e87b2f5a
...
...
@@ -5,11 +5,6 @@
# wich contains all the source code of the app
FROM
debian:stretch
MAINTAINER
ISCPIF <gargantext@iscpif.fr>
# Configure global ENV with deb dependencies
# Configure local ENV requirements
########################################################################
ENV
DEBIAN_FRONTEND noninteractive
USER
root
...
...
@@ -84,4 +79,7 @@ RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.5/main/pg_hba.co
RUN
echo
"listen_addresses='*'"
>>
/etc/postgresql/9.5/main/postgresql.conf
EXPOSE
5432 8000
VOLUME
["/srv/",]
install/gargamelle/django_configure.sh
View file @
e87b2f5a
...
...
@@ -8,17 +8,23 @@
##################################################
#configure django migrations
##################################################
echo
"::::: DJANGO :::::"
#echo "Starting Postgres"
#/usr/sbin/service postgresql start
echo
"Starting Postgres"
/usr/sbin/service postgresql start
/bin/su gargantua
-c
'source /env_3-5/bin/activate &&\
echo "Activated env" &&\
./srv/gargantext/manage.py makemigrations &&\
./srv/gargantext/manage.py migrate && \
echo "migrations ok" &&\
./srv/gargantext/dbmigrate.py && \
./srv/gargantext/dbmigrate.py && \
./srv/gargantext/dbmigrate.py && \
./srv/gargantext/manage.py createsuperuser'
/bin/su gargantua
-c
'source /env_3-5/bin/activate \
&& ./srv/gargantext/manage.py makemigrations \
&& ./srv/gargantext/manage.py migrate \
&& ./srv/gargantext/dbmigrate.py \
&& ./srv/gargantext/dbmigrate.py \
&& ./srv/gargantext/dbmigrate.py;'
/usr/sbin/service postgresql stop
install/gargamelle/psql_configure.sh
View file @
e87b2f5a
...
...
@@ -8,25 +8,16 @@
## |_| \___/|___/\__\__, |_| \___||___/
## |___/
#######################################################################
service postgresql stop
su postgres
-c
'pg_dropcluster 9.5 main --stop'
echo
"::::: POSTGRESQL :::::"
su postgres
-c
'pg_dropcluster 9.4 main --stop'
#done in docker but redoing it
if
[[
-e
"/srv/gargandata"
]]
;
then
rm
-rf
/srv/gargandata/
*
else
mkdir
/srv/gargandata
;
chown
-R
postgres:postgres /srv/gargandata
fi
rm
-rf
/srv/gargandata
&&
mkdir
/srv/gargandata
&&
chown
postgres:postgres /srv/gargandata
su postgres
-c
'/usr/lib/postgresql/9.5/bin/initdb -D /srv/gargandata/'
su postgres
-c
'/usr/lib/postgresql/9.5/bin/pg_ctl -D /srv/gargandata/ -l journal_applicatif start'
#su postgres -c 'pg_createcluster -D /srv/gargandata 9.5 main
'
#su postgres -c 'pg_ctlcluster -D /srv/gargandata 9.5 main start
'
su postgres
-c
'pg_createcluster -D /srv/gargandata 9.5 main '
su postgres
-c
'pg_ctlcluster -D /srv/gargandata 9.5 main start
'
su postgres
-c
'pg_ctlcluster 9.5 main start
'
service postgresql start
...
...
@@ -34,4 +25,5 @@ su postgres -c "psql -c \"CREATE user gargantua WITH PASSWORD 'C8kdcUrAQy66U'\""
su postgres
-c
"createdb -O gargantua gargandb"
echo
"Postgres configured"
service postgresql stop
install/gargamelle/requirements.txt
View file @
e87b2f5a
...
...
@@ -32,5 +32,3 @@ lxml==3.5.0
requests-futures==0.9.7
bs4==0.0.1
requests==2.10.0
#testing github
#-e git://github.com/zzzeek/sqlalchemy.git@rel_1_1
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