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
7fe3cec7
Commit
7fe3cec7
authored
Jul 22, 2016
by
c24b
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DOCKER] M
parent
56aa4eca
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
25 deletions
+27
-25
settings.py
gargantext/settings.py
+1
-1
01-setup
install/01-setup
+11
-10
02-config
install/02-config
+11
-11
django_configure.sh
install/gargamelle/django_configure.sh
+2
-2
psql_configure.sh
install/gargamelle/psql_configure.sh
+2
-1
No files found.
gargantext/settings.py
View file @
7fe3cec7
...
@@ -23,7 +23,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
...
@@ -23,7 +23,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY
=
'!
%
ktkh981)piil1
%
t5r0g4$^0=uvdafk!=f2x8djxy7_gq(n5
%
'
SECRET_KEY
=
'!
%
ktkh981)piil1
%
t5r0g4$^0=uvdafk!=f2x8djxy7_gq(n5
%
'
# SECURITY WARNING: don't run with debug turned on in production!
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG
=
Fals
e
DEBUG
=
Tru
e
MAINTENANCE
=
False
MAINTENANCE
=
False
ALLOWED_HOSTS
=
[
'localhost'
ALLOWED_HOSTS
=
[
'localhost'
...
...
install/01-setup
View file @
7fe3cec7
```
#!/bin/bash
#!bin/bash
#name:01-setup
#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**************************"
;
echo
"****************SETUP**************************"
;
for
dir
in
"/srv/gargantext_lib"
"/srv/gargantext_static"
"/srv/gargantext_media"
;
do
for
dir
in
"/srv/gargantext_lib"
"/srv/gargantext_static"
"/srv/gargantext_media"
;
do
sudo mkdir
-p
$dir
;
sudo mkdir
-p
$dir
;
sudo chown
gargantua:gargantua
$dir
;
sudo chown
gargantua:gargantua
$dir
;
done
;
done
;
sudo wget http://dl.gargantext.org/gargantext_lib.tar.bz2 \
#here gargantext_lib.tar.bz2 inside this directory
&& sudo tar xvjf gargantext_lib.tar.bz2 -o /srv/gargantext_lib \
#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
\
&&
sudo chown
-R
gargantua:gargantua /srv/gargantext_lib
\
&&
echo
":::::::::::::::::Done::::::::::::::::::::::::::"
;
&&
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 @
7fe3cec7
#!/bin/bash
#!/bin/bash
#configure the base image gargamelle
#configure the base image gargamelle
echo
'****************BUILD**********************************'
#
echo '****************BUILD**********************************'
docker build
-t
gargamelle:latest ./gargamelle
sudo
docker build
-t
gargamelle:latest ./gargamelle
#sudo docker build -t gargamelle:latest ./gargamelle
#2 option with this image:
#2 option with this image:
# configure the container
# configure the container
# run the image with the app in it
# run the image with the app in it
...
@@ -15,15 +15,15 @@ sudo docker run \
...
@@ -15,15 +15,15 @@ sudo docker run \
-p
8000
\
-p
8000
\
-p
5432
\
-p
5432
\
-it
gargamelle:latest
\
-it
gargamelle:latest
\
/bin/bash
-c
"/srv/gargantext/install/gargamelle/psql_configure.sh"
/bin/bash
-c
"/srv/gargantext/install/gargamelle/psql_configure.sh
&& /srv/gargantext/install/gargamelle/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 }'
`
sudo
docker run
\
#~
sudo docker run \
-v
/srv/:/srv/
\
#~
-v /srv/:/srv/ \
-p
8000
\
#~
-p 8000 \
-p
5432
\
#~
-p 5432 \
-it
gargamelle:latest
\
#~
-it gargamelle:latest \
/bin/bash
-c
"/srv/gargantext/install/gargamelle/django_configure.sh
"
#~ /bin/bash -c "/srv/gargantext/install/gargamelle/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/gargamelle/django_configure.sh
View file @
7fe3cec7
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
echo
"Starting Postgres"
#
echo "Starting Postgres"
/usr/sbin/service postgresql start
#
/usr/sbin/service postgresql start
/bin/su gargantua
-c
'source /env_3-5/bin/activate \
/bin/su gargantua
-c
'source /env_3-5/bin/activate \
&& ./srv/gargantext/manage.py makemigrations \
&& ./srv/gargantext/manage.py makemigrations \
...
...
install/gargamelle/psql_configure.sh
View file @
7fe3cec7
...
@@ -22,6 +22,7 @@ else
...
@@ -22,6 +22,7 @@ else
fi
fi
su postgres
-c
'/usr/lib/postgresql/9.5/bin/initdb -D /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
'/usr/lib/postgresql/9.5/bin/pg_ctl -D /srv/gargandata/ -l journal_applicatif start'
su postgres
-c
'/usr/lib/postgresql/9.5/bin/pg_ctl -D /srv/gargandata/ -l journal_applicatif start'
...
@@ -34,4 +35,4 @@ su postgres -c "psql -c \"CREATE user gargantua WITH PASSWORD 'C8kdcUrAQy66U'\""
...
@@ -34,4 +35,4 @@ su postgres -c "psql -c \"CREATE user gargantua WITH PASSWORD 'C8kdcUrAQy66U'\""
su postgres
-c
"createdb -O gargantua gargandb"
su postgres
-c
"createdb -O gargantua gargandb"
echo
"Postgres configured"
echo
"Postgres configured"
service postgresql stop
#
service postgresql stop
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