automaticly create the basex db from sourcesPrep
This commit is contained in:
+12
-2
@@ -1,5 +1,15 @@
|
|||||||
FROM basex/basexhttp:latest
|
FROM basex/basexhttp:latest
|
||||||
|
|
||||||
# RUN basex run db:create("gdp","/srv/basex/src/gdp.tei.xml")
|
COPY ./bashrc /srv/.bashrc
|
||||||
|
COPY ./inputrc /srv/.inputrc
|
||||||
|
|
||||||
RUN 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()})"
|
# RUN 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()})"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
COPY ./gdp-entrypoint.sh /usr/local/bin
|
||||||
|
USER root
|
||||||
|
RUN chmod +x /usr/local/bin/gdp-entrypoint.sh
|
||||||
|
# RUN ln -s /usr/local/bin/gdp-entrypoint.sh /srv/ # backwards compat
|
||||||
|
USER basex
|
||||||
|
CMD ["/bin/sh","/usr/local/bin/gdp-entrypoint.sh"]
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
PS1='\e[36m\e[1mBaseX\e[0m:\e[90m\w\e[0m\n$ '
|
||||||
|
bind '"\e[A": history-search-backward'
|
||||||
|
bind '"\e[B": history-search-forward'
|
||||||
Executable
+10
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# todo: run some checks
|
||||||
|
|
||||||
|
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()})"
|
||||||
|
|
||||||
|
# as we override the parent container CMD, we have to launch basexhttp here
|
||||||
|
echo "Launching basexhttp"
|
||||||
|
basexhttp
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
set show-all-if-ambiguous on
|
||||||
|
set completion-ignore-case on
|
||||||
+16
-12
@@ -1,8 +1,8 @@
|
|||||||
version: "3.5"
|
version: '3.7'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
basex:
|
basex:
|
||||||
build: ./Docker/basex/
|
build: ./Docker/basex/
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- 1984:1984
|
- 1984:1984
|
||||||
- 8984:8984
|
- 8984:8984
|
||||||
@@ -10,15 +10,19 @@ services:
|
|||||||
- "${SYNOPSX_ROOT}:/srv/basex/webapp/synopsx"
|
- "${SYNOPSX_ROOT}:/srv/basex/webapp/synopsx"
|
||||||
- "${WEBAPP_ROOT}:/srv/basex/webapp/synopsx/workspace/gdp"
|
- "${WEBAPP_ROOT}:/srv/basex/webapp/synopsx/workspace/gdp"
|
||||||
- "${DATA_ROOT}:/srv/basex/src"
|
- "${DATA_ROOT}:/srv/basex/src"
|
||||||
|
- basex-home:/srv
|
||||||
# - "${LOG_ROOT}:/var/log:rw"
|
# - "${LOG_ROOT}:/var/log:rw"
|
||||||
|
working_dir: "/srv/basex"
|
||||||
|
|
||||||
nginx:
|
# nginx:
|
||||||
build: ./Docker/nginx/
|
# build: ./Docker/nginx/
|
||||||
ports:
|
# ports:
|
||||||
- 8990:80
|
# - 8990:80
|
||||||
volumes:
|
# volumes:
|
||||||
- "${CLIENT_ROOT}:/var/www/html"
|
# - "${CLIENT_ROOT}:/var/www/html"
|
||||||
- "${LOG_ROOT}:/var/log:rw"
|
# - "${LOG_ROOT}:/var/log:rw"
|
||||||
working_dir: "/var/www/html/"
|
# working_dir: "/var/www/html/"
|
||||||
depends_on:
|
# depends_on:
|
||||||
- basex
|
# - basex
|
||||||
|
volumes:
|
||||||
|
basex-home:
|
||||||
|
|||||||
Reference in New Issue
Block a user