Compare commits
17
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e441d3b5a | ||
|
|
3479fb6688 | ||
|
|
700a01a0d4 | ||
|
|
ed21394a25 | ||
|
|
1cf6a4ba1e | ||
|
|
fdf82583fe | ||
|
|
47ddbe61a5 | ||
|
|
8bd97b031a | ||
|
|
e125aaf39b | ||
|
|
b4328dca7b | ||
|
|
cabae621b7 | ||
|
|
24a6ff60f7 | ||
|
|
696ce52966 | ||
|
|
a0324a73ef | ||
|
|
2d291ac4e4 | ||
|
|
45b1d544d4 | ||
|
|
85c13ebf5d |
@@ -4,6 +4,14 @@
|
||||
|
||||
echo "Creating GDP BaseX db"
|
||||
basex "db:create('gdp','/srv/basex/src/gdp.tei.xml', (),map {'ftindex': true(),'stemming': true(),'casesens': true(),'diacritics': true(),'language': 'fr','updindex': true(),'autooptimize': true(),'maxlen': 96,'maxcats': 100,'splitsize': 0,'chop': false(),'textindex': true(),'attrindex': true(),'tokenindex': true(), 'xinclude': true()})"
|
||||
# , 'serializer': 'indent=no'
|
||||
|
||||
echo "Creating FullText Index tmp file"
|
||||
basex "xslt:transform(fn:doc('/srv/basex/src/gdp.tei.xml'), fn:doc('/srv/basex/src/xslt/generateFullTextIndex.xsl'))" > /tmp/gdpFtIndex.xml
|
||||
|
||||
echo "Creating FullText Index DB"
|
||||
basex "db:create('gdpFtIndex', '/tmp/gdpFtIndex.xml', (),map {'ftindex': true(),'stemming': true(),'casesens': true(),'diacritics': true(),'language': 'fr','updindex': true(),'autooptimize': true(),'maxlen': 96,'maxcats': 100,'splitsize': 0,'chop': false(),'textindex': true(),'attrindex': true(),'tokenindex': true(), 'xinclude': true()})"
|
||||
# , 'serializer': 'indent=no'
|
||||
|
||||
# as we override the parent container CMD, we have to launch basexhttp here
|
||||
echo "Launching basexhttp"
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
FROM nginx:latest
|
||||
|
||||
COPY ./bashrc /root/.bashrc
|
||||
COPY ./inputrc /root/.inputrc
|
||||
COPY ./index.html /var/www/html/index.html
|
||||
# COPY ./default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY ./default.conf /etc/nginx/nginx.conf
|
||||
@@ -1,3 +0,0 @@
|
||||
PS1='\e[36m\e[1mNGINX\e[0m:\e[90m\w\e[0m\n$ '
|
||||
bind '"\e[A": history-search-backward'
|
||||
bind '"\e[B": history-search-forward'
|
||||
@@ -1,49 +0,0 @@
|
||||
worker_processes 1;
|
||||
|
||||
events { worker_connections 1024; }
|
||||
|
||||
http {
|
||||
upstream docker-api {
|
||||
server basex:8984;
|
||||
}
|
||||
upstream docker-client {
|
||||
server client:8988;
|
||||
}
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $server_name;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
root /var/www/html;
|
||||
index index.html;
|
||||
charset utf-8;
|
||||
server_name dev.gdp.fr;
|
||||
|
||||
access_log on;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
|
||||
sendfile off;
|
||||
|
||||
client_max_body_size 100m;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ index.html;
|
||||
}
|
||||
|
||||
location /api {
|
||||
rewrite ^/api/(.*) /$1 break;
|
||||
proxy_redirect off;
|
||||
proxy_pass http://docker-api;
|
||||
}
|
||||
|
||||
location /client {
|
||||
rewrite ^/client/(.*) /$1 break;
|
||||
proxy_redirect off;
|
||||
proxy_pass http://docker-client;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Proxy</title>
|
||||
</head>
|
||||
<body>
|
||||
<ul>
|
||||
<li><a href="/api">api</a></li>
|
||||
<li><a href="/client">client</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,2 +0,0 @@
|
||||
set show-all-if-ambiguous on
|
||||
set completion-ignore-case on
|
||||
@@ -10,7 +10,7 @@ sudo pacman -S docker docker-compose docker-machine
|
||||
this will clone this repos (main docker environement) and necessary other source code (synopsx, webapp, xml-tei sources, vuejs client)
|
||||
|
||||
```
|
||||
git clone --recursive -o figli https://figureslibres.io/gogs/bachir/docker-gdp.git
|
||||
git clone --recursive https://figureslibres.io/gogs/bachir/docker-gdp.git
|
||||
```
|
||||
|
||||
## Docker
|
||||
@@ -31,25 +31,39 @@ then each time you want to launch the app
|
||||
sudo docker-compose up -d
|
||||
```
|
||||
|
||||
## DB
|
||||
<del>connect http://localhost:8984/synopsx/create-project</del>
|
||||
|
||||
<del>create a 'gdp' project</del>
|
||||
|
||||
<del>connect to http://localhost:8984/synopsx/config</del>
|
||||
<del>select 'gpd' and click on 'ok'</del>
|
||||
|
||||
## API
|
||||
the api is ready, you can go to http://localhost:8984/gdp/home
|
||||
|
||||
## Client
|
||||
open http://localhost:8988 in your browser
|
||||
|
||||
## Vhost or Cross Origins Policy
|
||||
Cross origin poilicy will block the api requests from client
|
||||
You'll need to install vhost domain for api and client, like dev.gdp.net and dev.api.gdp.net
|
||||
Or in firefox install this addon to allow cors addons.mozilla.org/en-US/firefox/addon/cors-everywhere/
|
||||
|
||||
## Logs
|
||||
to follow the webpack compilation process, run
|
||||
```
|
||||
sudo docker-compose logs -f
|
||||
```
|
||||
|
||||
## Update
|
||||
update the code
|
||||
```
|
||||
git pull origin master
|
||||
git pull --recurse-submodules
|
||||
```
|
||||
restart the containers
|
||||
```
|
||||
docker-compose restart basex
|
||||
docker-compose restart client
|
||||
```
|
||||
or rebuild if data was updated
|
||||
```
|
||||
docker-compose up -d --build
|
||||
```
|
||||
|
||||
## Doc
|
||||
|
||||
https://github.com/guidesDeParis/webapp/blob/master/install.md
|
||||
|
||||
+1
-1
Submodule client updated: 01e4d99537...62bde64b7b
+1
-1
Submodule data updated: 423de0caf0...be38d679b6
@@ -12,8 +12,6 @@ services:
|
||||
- 1984:1984
|
||||
- 8984:8984
|
||||
working_dir: "/srv/basex"
|
||||
networks:
|
||||
- api
|
||||
|
||||
client:
|
||||
build: ./Docker/client
|
||||
@@ -25,28 +23,7 @@ services:
|
||||
working_dir: "/app"
|
||||
depends_on:
|
||||
- basex
|
||||
networks:
|
||||
- client
|
||||
|
||||
nginx:
|
||||
build: ./Docker/nginx/
|
||||
ports:
|
||||
- 8999:80
|
||||
volumes:
|
||||
- "${LOG_ROOT}:/var/log:rw"
|
||||
# working_dir: "/var/www/html"
|
||||
depends_on:
|
||||
- basex
|
||||
- client
|
||||
networks:
|
||||
- api
|
||||
- client
|
||||
|
||||
|
||||
volumes:
|
||||
basex-home:
|
||||
# client-home:
|
||||
|
||||
networks:
|
||||
api:
|
||||
client:
|
||||
|
||||
+1
-1
Submodule synopsx updated: 558dd832a2...be50808d13
+1
-1
Submodule webapp updated: e6ca72b4a0...a22c918986
Reference in New Issue
Block a user