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
5c234cfa
Commit
5c234cfa
authored
Apr 26, 2016
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[INSTALL] Docker file.
parent
27f545d2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
141 additions
and
81 deletions
+141
-81
CHEAT.md
install/docker/CHEAT.md
+15
-0
Dockerfile
install/docker/dev/Dockerfile
+15
-74
export.sh
install/docker/dev/export.sh
+8
-0
install.sh
install/docker/dev/install.sh
+93
-6
launch.sh
install/docker/dev/launch.sh
+10
-0
requirements.txt
install/docker/dev/requirements.txt
+0
-1
No files found.
install/docker/CHEAT.md
0 → 100644
View file @
5c234cfa
#A quick way to recover space (assuming site is running)
sudo docker rm
`docker ps -a | grep Exited | awk '{print $1 }'`
sudo docker rmi
`docker images -aq`
# list all containers
docker ps -a
# remove a container
docker rm $container_id
install/docker/dev/Dockerfile
View file @
5c234cfa
...
...
@@ -8,11 +8,11 @@
###########################################################
######################################################################
FROM
debian:stretch
#
FROM gargantext
#
FROM debian:stretch
FROM
gargantext
MAINTAINER
ISCPIF <alexandre.delanoe@iscpif.fr>
######################################################################
#
USER
root
RUN
apt-get update
&&
\
...
...
@@ -20,7 +20,7 @@ RUN apt-get update && \
apt-utils ca-certificates locales
\
sudo
aptitude gcc g++ wget git postgresql-9.5 vim
## Configure timezone and locale
##
#
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
&&
\
...
...
@@ -29,8 +29,8 @@ RUN echo "Europe/Paris" > /etc/timezone && \
dpkg-reconfigure
--frontend
=
noninteractive locales
&&
\
update-locale
LANG
=
fr_FR.UTF-8
## Install Database, main dependencies and Python
## (installing some Debian version before pip to get dependencies)
##
#
Install Database, main dependencies and Python
##
#
(installing some Debian version before pip to get dependencies)
RUN
apt-get update
&&
apt-get
install
-y
\
postgresql-server-dev-9.5 libpq-dev libxml2
\
libxml2-dev xml-core libgfortran-5-dev
\
...
...
@@ -44,80 +44,21 @@ RUN apt-get update && apt-get install -y \
libxml2-dev libxslt-dev
# ^ for lxml
## PROD VERSION OF GARGANTEXT ONLY
##
#
PROD VERSION OF GARGANTEXT ONLY
#RUN apt-get install -y uwsgi nginx uwsgi-plugin-python rabbitmq-server
# ## CREATE USER and adding it to sudo
# ## TODO ask user for password
#
#
#
## 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
# FIXME, it depends on postgres configuration
VOLUME
["/srv","/var"]
# Create directories in /srv
# FIXME: not tested
RUN for
dir
in
"/srv/gargantext"
\
"/srv/gargantext_lib"
\
"/srv/gargantext_static"
\
"/srv/gargantext_media"
\
"/srv/env_3-5"
\
"/var/www/gargantext"
;
do
\
mkdir
-p
$dir
;
\
chown
gargantua:gargantua
$dir
;
\
done
;
\
echo
"Root: END of the installation of Gargantext by Root."
;
######################################################################
## CONFIGURE POSTGRESQL
######################################################################
USER
postgres
RUN
/etc/init.d/postgresql start
&&
\
psql -c "CREATE user gargantua WITH PASSWORD 'C8kdcUrAQy66U'" &&\
createdb -O gargantua gargandb \
&& echo "Root: END of the installation of Gargantexts Database by postgres."
######################################################################
## INSTALL MAIN DEPENDENCIES
######################################################################
#USER gargantua
#
#
## Installing pip version of python libs
## Possible FIXME : if `pip install -r requirements.txt` fails
## then: fixme >> maybe (split the list)
## else: enjoy
#
## TODO: user local file requirements with docker (and not wget)
#
#RUN wget http://dl.delanoe.org/requirements.txt -o /tmp/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 /tmp/requirements.txt'
#
## GET CONFIG FILES (need update)
#WORKDIR /tmp
#RUN wget http://dl.gargantext.org/gargantext_lib.tar.bz2 \
# && tar xvjf gargantext_lib.tar.bz2 -o /srv/gargantext_lib \
# && chown -R gargantua:gargantua /srv/gargantext_lib \
# && echo "Root: END of the installation of Gargantexts Database by postgres."
# TODO script pour peupler la base
######################################################################
# Last step as user:
## TODO (soon) : git clone https://gogs.iscpif.fr/gargantext.git
#RUN git clone ssh://gitolite@delanoe.org:1979/gargantext /srv/gargantext \
# && cd /srv/gargantext \
# && git fetch origin refactoring \
# && git checkout refactoring
#######################################################################
### CONFIGURE POSTGRESQL
#######################################################################
RUN
sed
-iP
's%^data_directory.*%data_directory = '
\/
srv
\/
gargantext_data
'%'
/etc/postgresql/9.5/main/postgresql.conf
######################################################################
install/docker/dev/export.sh
0 → 100755
View file @
5c234cfa
#!/bin/bash
sudo
docker
export
$(
sudo
docker ps
-l
|
awk
'{print $1}'
|
grep
-v
CONTAINER |
head
-n
1
)
>
/tmp/gargantext_docker_image.tar
# To import the docker
#sudo docker import - gargantext:latest < data.tar
#sudo cat data.tar | docker import - gargantext
install/docker/dev/install.sh
View file @
5c234cfa
#/bin/bash
# in progress
## Quick Manual
## Install docker.io && sudo
## sudo docker build -t gargantext .
## docker run -i -t gargantext /bin/bash
# Install Docker
# Debian/Ubuntu: apt-get install docker
# run turboparser port, with python 3.4
#docker run -d -p 8000:8000 -v /srv:/srv -t gargantext python /srv/gargantext/gargantext.py
# launch
#cd /srv/gargantext
#source /srv/env_3-5/bin/activate &&
#docker run -d -p 8000:8000 -v /srv:/srv -t gargantext python /srv/gargantext/gargantext.py
#######################################################################
#sudo adduser --disabled-password --gecos "" gargantua
### Create directories in /srv
### FIXME: not tested
#for dir in "/srv/gargantext"\
# "/srv/gargantext_lib"\
# "/srv/gargantext_static"\
# "/srv/gargantext_media"\
# "/srv/gargantext_data"\
# "/srv/env_3-5"\
# "/var/www/gargantext"; do \
# sudo mkdir -p $dir ;\
# sudo chown gargantua:gargantua $dir ; \
#done
#
#######################################################################
## Last step as user:
### TODO (soon) : git clone https://gogs.iscpif.fr/gargantext.git
#git clone ssh://gitolite@delanoe.org:1979/gargantext /srv/gargantext \
# && cd /srv/gargantext \
# && git fetch origin refactoring \
# && git checkout refactoring
#
######################################################################
# ____ _
# | _ \ ___ ___| | _____ _ __
# | | | |/ _ \ / __| |/ / _ \ '__|
# | |_| | (_) | (__| < __/ |
# |____/ \___/ \___|_|\_\___|_|
#
######################################################################
sudo
docker build
-t
gargantext
.
# OR
# cd /tmp
# wget http://dl.gargantext.org/gargantext_docker_image.tar \
# && sudo docker import - gargantext:latest < gargantext_docker_image.tar
######################################################################
# ____ _
# | _ \ ___ ___| |_ __ _ _ __ ___ ___
# | |_) / _ \/ __| __/ _` | '__/ _ \/ __|
# | __/ (_) \__ \ || (_| | | | __/\__ \
# |_| \___/|___/\__\__, |_| \___||___/
# |___/
######################################################################
#
# sudo chown -R postgres:postgres /srv/gargantext_data/ \
# su postgres -c '/usr/lib/postgresql/9.5/bin/initdb -D /srv/gargantext_data/'
#
# sudo /etc/init.d/postgresql start \
# && psql -c "CREATE user gargantua WITH PASSWORD 'C8kdcUrAQy66U'" \
# && createdb -O gargantua gargandb \
# && echo "Root: END of the installation of Gargantexts Database by postgres."
#
######################################################################
# _ _ _ _ _
# | | (_) |__ _ __ __ _(_)_ __(_) ___ ___
# | | | | '_ \| '__/ _` | | '__| |/ _ \/ __|
# | |___| | |_) | | | (_| | | | | | __/\__ \
# |_____|_|_.__/|_| \__,_|_|_| |_|\___||___/
#
######################################################################
######################################################################
## INSTALL MAIN DEPENDENCIES
######################################################################
#USER gargantua
##
##
### Installing pip version of python libs
#WORKDIR /home/gargantua
#
#RUN /usr/bin/virtualenv --py=/usr/bin/python3.5 /srv/env_3-5 \
# && /bin/bash -c 'source /srv/env_3-5/bin/activate' \
# && /bin/bash -c '/srv/env_3-5/bin/pip install git+https://github.com/zzzeek/sqlalchemy.git@rel_1_1' \
# && /bin/bash -c '/srv/env_3-5/bin/pip install -r /srv/gargantext/install/python/requirements.txt'
#
# TODO script pour peupler la base
## GET CONFIG FILES (need update)
#wget http://dl.gargantext.org/gargantext_lib.tar.bz2 \
# && tar xvjf gargantext_lib.tar.bz2 -o /srv/gargantext_lib \
# && chown -R gargantua:gargantua /srv/gargantext_lib \
# && echo "Libs installed"
#
install/docker/dev/launch.sh
0 → 100755
View file @
5c234cfa
#!/bin/bash
sudo
docker run
-i
-p
8000:8000
\
-v
/srv:/srv
\
-v
/home/alexandre:/home/alexandre
\
-t
gargantext:latest
\
/bin/bash
#sudo docker run -i --name srv -v /srv:/srv -t gargantext:latest /bin/bash
install/docker/dev/requirements.txt
deleted
120000 → 0
View file @
27f545d2
../../python/requirements.txt
\ No newline at end of file
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