Compare commits
48
Commits
nginx-proxy
...
debug
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d57c6b3c06 | ||
|
|
e50e9ac0da | ||
|
|
8a6a9de45d | ||
|
|
82ae413857 | ||
|
|
536ba0783b | ||
|
|
67bae987d7 | ||
|
|
c2c4198d39 | ||
|
|
79bcd59dab | ||
|
|
c5d790b0d8 | ||
|
|
a7eff55a91 | ||
|
|
e0bfa917fe | ||
|
|
40a0e85a1d | ||
|
|
2d5bf65663 | ||
|
|
f13756e34b | ||
|
|
69a0b22750 | ||
|
|
1e39c5e193 | ||
|
|
f0a7735a52 | ||
|
|
f27ebea7c8 | ||
|
|
bbaff95481 | ||
|
|
036eafb796 | ||
|
|
a6b67f8876 | ||
|
|
4d71f70243 | ||
|
|
75b072def9 | ||
|
|
fd867c6985 | ||
|
|
a4641ad12f | ||
|
|
b6a17ce6f2 | ||
|
|
0c5d301b88 | ||
|
|
b18f51a14e | ||
|
|
eae1735d4c | ||
|
|
9cb13b3f3d | ||
|
|
99cd77e227 | ||
|
|
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"
|
||||
|
||||
@@ -4,21 +4,26 @@ RUN apk update && apk --no-cache add shadow && \
|
||||
usermod -u 1001 node && \
|
||||
groupmod -g 1001 node
|
||||
|
||||
RUN find / -group 1000 -exec chgrp -h node {} \;
|
||||
RUN find / -user 1000 -exec chown -h node {} \;
|
||||
ARG UID=1000
|
||||
ARG UNAME=gdp
|
||||
ARG GID=1000
|
||||
ARG GNAME=users
|
||||
|
||||
# RUN addgroup -g 1000 gdp && \
|
||||
#RUN find / -group ${UID} -exec chgrp -h node {} \;
|
||||
#RUN find / -user ${UID} -exec chown -h node {} \;
|
||||
|
||||
RUN addgroup -g ${DID} ${GNAME}
|
||||
# adduser -h /home/gdp -D -u 1000 gdp && \
|
||||
RUN adduser -u 1000 -G users -s /bin/sh -D gdp
|
||||
RUN adduser -u ${UID} -G ${GNAME} -s /bin/sh -D ${UNAME}
|
||||
# chown -R gdp:gdp /home/gdp
|
||||
|
||||
USER gdp
|
||||
USER ${UNAME}
|
||||
|
||||
COPY ./bashrc /home/gdp/.bashrc
|
||||
COPY ./inputrc /home/gdp/.inputrc
|
||||
COPY ./bashrc /home/${UNAME}/.bashrc
|
||||
COPY ./inputrc /home/${UNAME}/.inputrc
|
||||
|
||||
COPY ./client-entrypoint.sh /usr/local/bin
|
||||
USER root
|
||||
RUN chmod +x /usr/local/bin/client-entrypoint.sh
|
||||
USER gdp
|
||||
USER ${UNAME}
|
||||
CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]
|
||||
|
||||
@@ -2,9 +2,12 @@
|
||||
|
||||
cat /etc/passwd|grep 1000
|
||||
|
||||
echo "Npm install"
|
||||
|
||||
cd /app
|
||||
|
||||
echo "Cleaning node_modules"
|
||||
rm -rf node_modules
|
||||
|
||||
echo "Npm install"
|
||||
npm install
|
||||
|
||||
echo "Run npm dev"
|
||||
|
||||
@@ -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
|
||||
@@ -25,31 +25,52 @@ only before the first run (may take some time)
|
||||
```
|
||||
sudo docker-compose build
|
||||
```
|
||||
or with args for groups and users
|
||||
```
|
||||
docker-compose build --build-arg UID=$(id -u) --build-arg GID=$(id -g) --build-arg UNAME=$(id -un) --build-arg GNAME=$(id -gn)
|
||||
```
|
||||
### run
|
||||
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
|
||||
the api is ready, you can go to http://localhost:8984/home
|
||||
|
||||
### indexing
|
||||
before you can use the client you need to trigger this url http://localhost:8984/indexing
|
||||
|
||||
## 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...14beb796ea
+1
-1
Submodule data updated: 423de0caf0...beee67faae
+1
-1
Submodule synopsx updated: 558dd832a2...c84136501e
+1
-1
Submodule webapp updated: e6ca72b4a0...34356e0fc7
Reference in New Issue
Block a user