dyndoc-ruby 1.3.9 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dyndoc-html-servers.rb +4 -1
- metadata +2 -7
- data/share/dyn-site/docker/dyn-site.sh +0 -54
- data/share/dyn-site/docker/files/Dockerfile-dyndoc +0 -31
- data/share/dyn-site/docker/files/Dockerfile-website +0 -9
- data/share/dyn-site/docker/files/docker-compose.yml +0 -21
- data/share/dyn-site/dyn-site.sh +0 -167
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 874ff2bfd3cfd0a3cbc30680e7ddadb68be8a3c417d85582e05c699855a96cec
|
4
|
+
data.tar.gz: c47643d6023b0c525a23944127f578eb4c519cc19d35302deb7fdc4724f248f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43fc0de9ab39f1dbee93acd2d3bedc272b21b154227dfe5a3c2c943816ae3f23a0e1b8372b2fd773181c5bd033d022d681900baf88c3c1ab64d686ca8ad698ad
|
7
|
+
data.tar.gz: 0ead492497f229e9b37b04196336e3910db2611c1af3bd9d8fcf23a2943c7703b3e9def436ede1b3c0753e32670931dd7c0bc08bbb7eda3db40b3c39abbbd301
|
data/lib/dyndoc-html-servers.rb
CHANGED
@@ -228,7 +228,10 @@ module Dyndoc
|
|
228
228
|
|
229
229
|
def HtmlServers.dyn_http_server(host=nil,port=nil)
|
230
230
|
require 'thin'
|
231
|
-
dyn_html_srv_ru=
|
231
|
+
dyn_html_srv_ru="/home/ubuntu/tools/dyn-html/srv.ru" # DyndocDockerSite guest-tools folder
|
232
|
+
dyn_html_srv_ru=File.join(ENV["HOME"],"dyndoc","html-srv","dyn.ru") unless File.exists? dyn_html_srv_ru
|
233
|
+
dyn_html_srv_ru=File.expand_path("../../share/html-srv/dyn-html-srv.ru",__FILE__) unless File.exists? dyn_html_srv_ru
|
234
|
+
|
232
235
|
arg=["-R",dyn_html_srv_ru]
|
233
236
|
if HtmlServers.cfg["html-srv-port"]
|
234
237
|
arg += ["-p",HtmlServers.cfg["html-srv-port"].to_s]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dyndoc-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RCqls
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: R4rb
|
@@ -230,11 +230,6 @@ files:
|
|
230
230
|
- share/demo/testBeamer.dyn
|
231
231
|
- share/demo/testBeamer_lib.dyn
|
232
232
|
- share/demo/test_atom.dyn
|
233
|
-
- share/dyn-site/docker/dyn-site.sh
|
234
|
-
- share/dyn-site/docker/files/Dockerfile-dyndoc
|
235
|
-
- share/dyn-site/docker/files/Dockerfile-website
|
236
|
-
- share/dyn-site/docker/files/docker-compose.yml
|
237
|
-
- share/dyn-site/dyn-site.sh
|
238
233
|
- share/dyndoc.yml/README.md
|
239
234
|
- share/dyndoc.yml/example.dyndoc.yml
|
240
235
|
- share/dyntasks/clean_task.dyn
|
@@ -1,54 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
cmd=$1
|
4
|
-
script="bin/.action.sh"
|
5
|
-
|
6
|
-
RootSrv=/home/ubuntu/RodaSrv
|
7
|
-
|
8
|
-
echo "## do not modify since automatically generated" > $script
|
9
|
-
|
10
|
-
case $cmd in
|
11
|
-
first)
|
12
|
-
## Not necessary for docker
|
13
|
-
#mkdir -p ../../RodaSrv/edit
|
14
|
-
#mkdir -p ../../RodaSrv/public/users
|
15
|
-
;;
|
16
|
-
init)
|
17
|
-
## Create the RodaSrv folder
|
18
|
-
echo "mkdir -p /home/ubuntu/RodaSrv/edit" >> $script
|
19
|
-
echo "mkdir -p /home/ubuntu/RodaSrv/public" >> $script
|
20
|
-
echo "mkdir -p /home/ubuntu/RodaSrv/system" >> $script
|
21
|
-
## Config file
|
22
|
-
echo "echo '---' > /home/ubuntu/dyndoc/etc/dyn-html.yml" >> $script
|
23
|
-
echo "echo 'root: /home/ubuntu/RodaSrv' >> /home/ubuntu/dyndoc/etc/dyn-html.yml" >> $script
|
24
|
-
docker-compose exec --user ubuntu website bash /home/ubuntu/bin/.action.sh
|
25
|
-
;;
|
26
|
-
add)
|
27
|
-
# get RodaWebUser from environment variable
|
28
|
-
RodaWebUser=$2
|
29
|
-
if [ "$RodaWebUser" != "" ]; then
|
30
|
-
echo "mkdir -p ${RootSrv}/edit/${RodaWebUser}" >> $script
|
31
|
-
echo "mkdir -p ${RootSrv}/public/pages" >> $script
|
32
|
-
echo "mkdir -p ${RootSrv}/public/users/${RodaWebUser}/pages/${RodaWebUser}" >> $script
|
33
|
-
echo "cd ${RootSrv}/public/pages" >> $script
|
34
|
-
echo "ln -s ../users/${RodaWebUser}/pages/${RodaWebUser} ${RodaWebUser}" >> $script
|
35
|
-
docker-compose exec --user ubuntu website bash /home/ubuntu/bin/.action.sh
|
36
|
-
fi
|
37
|
-
;;
|
38
|
-
status | start | stop)
|
39
|
-
docker-compose exec --user ubuntu website bash -c "/usr/local/bin/dyn-ctl $cmd"
|
40
|
-
;;
|
41
|
-
bash)
|
42
|
-
docker-compose exec --user ubuntu website bash
|
43
|
-
;;
|
44
|
-
build)
|
45
|
-
docker-compose build dyndoc-ruby
|
46
|
-
docker-compose build website
|
47
|
-
;;
|
48
|
-
up)
|
49
|
-
docker-compose up -d website
|
50
|
-
;;
|
51
|
-
down)
|
52
|
-
docker-compose down
|
53
|
-
;;
|
54
|
-
esac
|
@@ -1,31 +0,0 @@
|
|
1
|
-
FROM ubuntu:$DyndocRubyUbuntu$
|
2
|
-
MAINTAINER "Cqls Team"
|
3
|
-
|
4
|
-
RUN groupadd -r ubuntu && useradd -r -g ubuntu ubuntu
|
5
|
-
|
6
|
-
RUN apt-get update && \
|
7
|
-
apt-get -y install sudo
|
8
|
-
|
9
|
-
RUN apt-get install -y curl wget locales
|
10
|
-
|
11
|
-
RUN locale-gen fr_FR.UTF-8
|
12
|
-
ENV LANG fr_FR.UTF-8
|
13
|
-
ENV LANGUAGE fr_FR:fr
|
14
|
-
ENV LC_ALL fr_FR.UTF-8
|
15
|
-
|
16
|
-
RUN bash -c "$(curl -fs https://cqls.dyndoc.fr/users/RCqls/Dyndoc/install/install-ubuntu16.sh)"
|
17
|
-
|
18
|
-
EXPOSE 9294
|
19
|
-
|
20
|
-
WORKDIR /home/ubuntu
|
21
|
-
|
22
|
-
VOLUME ["/home/ubuntu/bin"]
|
23
|
-
|
24
|
-
RUN chown -R ubuntu:ubuntu /home/ubuntu
|
25
|
-
|
26
|
-
USER ubuntu
|
27
|
-
|
28
|
-
RUN dyn-init
|
29
|
-
|
30
|
-
RUN dpm install rcqls/DyndocWebTools.dyn
|
31
|
-
RUN dpm link rcqls/DyndocWebTools.dyn
|
@@ -1,21 +0,0 @@
|
|
1
|
-
version: '2'
|
2
|
-
|
3
|
-
services:
|
4
|
-
dyndoc-ruby:
|
5
|
-
build:
|
6
|
-
context: DockerFiles
|
7
|
-
dockerfile: Dockerfile-dyndoc
|
8
|
-
image: rcqls/dyndoc-ruby-$DyndocRubyUbuntu$
|
9
|
-
|
10
|
-
website:
|
11
|
-
build:
|
12
|
-
context: DockerFiles
|
13
|
-
dockerfile: Dockerfile-website
|
14
|
-
restart: always
|
15
|
-
volumes:
|
16
|
-
- $RodaSrvPublic$:/home/ubuntu/RodaSrv/public
|
17
|
-
- $RodaSrvSystem$:/home/ubuntu/RodaSrv/install
|
18
|
-
- ./bin:/home/ubuntu/bin
|
19
|
-
ports:
|
20
|
-
- $RodaSrvPort$:9294
|
21
|
-
tty: true
|
data/share/dyn-site/dyn-site.sh
DELETED
@@ -1,167 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
|
4
|
-
RootSrv=$HOME/RodaSrv
|
5
|
-
|
6
|
-
if [ "$1" = "--root" ];then
|
7
|
-
shift
|
8
|
-
RootSrv=$1
|
9
|
-
if [ $RootSrv = "cfg" ]; then
|
10
|
-
RootSrv=`ruby -e 'require "yaml";puts YAML::load_file(File.join(ENV["HOME"],"dyndoc/etc/dyn-html.yml"))["root"]'`
|
11
|
-
fi
|
12
|
-
shift
|
13
|
-
fi
|
14
|
-
|
15
|
-
Cmd=$1
|
16
|
-
|
17
|
-
#echo "Command: $Cmd"
|
18
|
-
|
19
|
-
if [ "$Cmd" = "" ]; then
|
20
|
-
Cmd="help"
|
21
|
-
fi
|
22
|
-
|
23
|
-
|
24
|
-
case $Cmd in
|
25
|
-
set-root)
|
26
|
-
new-root=$2
|
27
|
-
## Config file
|
28
|
-
echo "---" > $HOME/dyndoc/etc/dyn-html.yml
|
29
|
-
echo "root: $new-root" >> $HOME/dyndoc/etc/dyn-html.yml
|
30
|
-
;;
|
31
|
-
help)
|
32
|
-
echo "Aide:"
|
33
|
-
echo "----"
|
34
|
-
echo " dyn-site [--root <cfg|ROOT>] first (création de l'arborescence de base)"
|
35
|
-
echo " dyn-site [--root <cfg|ROOT>] init [zip|link <PATH>](installation de tools et system)"
|
36
|
-
echo " dyn-site [--root <cfg|ROOT>] add <User> (ajout d'un utilisateur <User>)"
|
37
|
-
echo " dyn-site [--root <cfg|ROOT>] rebase <Conf> (cas de workshop où <Conf>=<User>)"
|
38
|
-
echo " dyn-site [--root <cfg|ROOT>] rebase-subdir <Subdir> <Prj> (Subdir=<User>/<PrjPath>)"
|
39
|
-
echo " dyn-site vscode [--update] (install vscode plugin for dyndoc)"
|
40
|
-
## DANGEROUS!: echo " dyn-site set-root <new-root>"
|
41
|
-
;;
|
42
|
-
first)
|
43
|
-
## Not necessary for docker
|
44
|
-
mkdir -p $RootSrv/edit
|
45
|
-
mkdir -p $RootSrv/public/users
|
46
|
-
;;
|
47
|
-
init)
|
48
|
-
installmode=$2
|
49
|
-
case $installmode in
|
50
|
-
zip)
|
51
|
-
## Install Specfic stuff inside
|
52
|
-
mkdir -p $RootSrv/install/RodaSrvTools
|
53
|
-
cd ${RootSrv}/install
|
54
|
-
if ! [ -d DynRodaSystem ]; then git clone https://toltex-gogs.dyndoc.fr/rcqls/DynRodaSystem.git; fi
|
55
|
-
if ! [ -f RodaSrvTools.zip ]; then
|
56
|
-
wget https://toltex-seafile.dyndoc.fr/f/128ced4435/?raw=1 -O RodaSrvTools.zip
|
57
|
-
cd RodaSrvTools
|
58
|
-
unzip ../RodaSrvTools.zip
|
59
|
-
fi
|
60
|
-
## Create links
|
61
|
-
cd ${RootSrv}
|
62
|
-
ln -sf install/DynRodaSystem system
|
63
|
-
cd public
|
64
|
-
ln -sf ../install/RodaSrvTools tools
|
65
|
-
;;
|
66
|
-
link)
|
67
|
-
rodatools_path=$2
|
68
|
-
## Create links
|
69
|
-
cd ${RootSrv}
|
70
|
-
ln -sf $rodatools_path/system system
|
71
|
-
cd public
|
72
|
-
ln -sf $rodatools_path/tools tools
|
73
|
-
esac
|
74
|
-
;;
|
75
|
-
add)
|
76
|
-
RodaWebUser=$2
|
77
|
-
if [ "$RodaWebUser" != "" ]; then
|
78
|
-
mkdir -p ${RootSrv}/edit/${RodaWebUser}
|
79
|
-
mkdir -p ${RootSrv}/public/pages
|
80
|
-
mkdir -p ${RootSrv}/public/users/${RodaWebUser}/.pages
|
81
|
-
cd ${RootSrv}/public/pages
|
82
|
-
ln -s ../users/${RodaWebUser}/.pages ${RodaWebUser}
|
83
|
-
fi
|
84
|
-
;;
|
85
|
-
rebase)
|
86
|
-
Conf=$2
|
87
|
-
if [ "${Conf}" = "" ]; then
|
88
|
-
exit
|
89
|
-
fi
|
90
|
-
PUBLIC_ROOT="$HOME/RodaSrv/public/users/${Conf}"
|
91
|
-
SITE_ROOT="$HOME/RodaSrv/.site/$Conf"
|
92
|
-
PAGES_ROOT="$SITE_ROOT/pages"
|
93
|
-
mkdir -p ${SITE_ROOT}
|
94
|
-
cp -R ${PUBLIC_ROOT}/* ${SITE_ROOT}/
|
95
|
-
cd ${PAGES_ROOT}
|
96
|
-
pages=$(ls *.html)
|
97
|
-
echo "pages to process: $pages"
|
98
|
-
for html in $pages
|
99
|
-
do
|
100
|
-
rebase_url --from /users/$Conf/ --to / $html
|
101
|
-
rebase_url --from /$Conf/ --to / $html
|
102
|
-
mv $html ..
|
103
|
-
done
|
104
|
-
cd $SITE_ROOT
|
105
|
-
rm -fr pages
|
106
|
-
;;
|
107
|
-
rebase-subdir)
|
108
|
-
Subdir=$2
|
109
|
-
if [ "${Subdir}" = "" ]; then
|
110
|
-
echo "Subdir doit être non vide!"
|
111
|
-
exit
|
112
|
-
fi
|
113
|
-
Prj=$3
|
114
|
-
if [ "${Prj}" = "" ]; then
|
115
|
-
echo "Prj doit être non vide!"
|
116
|
-
exit
|
117
|
-
fi
|
118
|
-
PUBLIC_ASSETS="$HOME/RodaSrv/public/users/${Subdir}/${Prj}"
|
119
|
-
PUBLIC_PAGES="$HOME/RodaSrv/public/pages/${Subdir}/${Prj}"
|
120
|
-
SITE_ROOT="$HOME/RodaSrv/.site/$Prj"
|
121
|
-
PAGES_ROOT="$SITE_ROOT/pages"
|
122
|
-
if [ -d ${SITE_ROOT} ]; then
|
123
|
-
rm -fr ${SITE_ROOT}
|
124
|
-
fi
|
125
|
-
mkdir -p ${PAGES_ROOT}
|
126
|
-
cp -R ${PUBLIC_PAGES}/* ${PAGES_ROOT}/
|
127
|
-
cp -R ${PUBLIC_ASSETS}/* ${SITE_ROOT}/
|
128
|
-
cd ${PAGES_ROOT}
|
129
|
-
pages=$(find . -name '*.html')
|
130
|
-
echo "pages to process: $pages"
|
131
|
-
for html in $pages
|
132
|
-
do
|
133
|
-
rebase_url --from /users/${Subdir}/${Prj}/ --to / $html
|
134
|
-
rebase_url --from /${Subdir}/${Prj}/ --to / $html
|
135
|
-
done
|
136
|
-
cd $SITE_ROOT
|
137
|
-
mv pages/* .
|
138
|
-
rm -fr pages
|
139
|
-
;;
|
140
|
-
vscode)
|
141
|
-
if [ -d ~/.vscode/extensions ]; then
|
142
|
-
cd ~/.vscode/extensions
|
143
|
-
mkdir tmp
|
144
|
-
cd tmp
|
145
|
-
git clone https://github.com/rcqls/dyndoc-syntax
|
146
|
-
cd ..
|
147
|
-
if [ -d dyndoc ]; then
|
148
|
-
if [ "$2" = "--update" ]; then
|
149
|
-
rm -fr dyndoc
|
150
|
-
mv tmp/dyndoc-syntax/vscode/dyndoc dyndoc
|
151
|
-
rm -fr tmp
|
152
|
-
fi
|
153
|
-
else
|
154
|
-
mv tmp/dyndoc-syntax/vscode/dyndoc dyndoc
|
155
|
-
rm -fr tmp
|
156
|
-
fi
|
157
|
-
fi
|
158
|
-
;;
|
159
|
-
# deploy)
|
160
|
-
# Conf=$2
|
161
|
-
# url="sfdsmqrk@ftp.sfds.asso.fr:$Conf/"
|
162
|
-
# if [ "$3" != "" ]; then
|
163
|
-
# url="$3"
|
164
|
-
# fi
|
165
|
-
# rsync -az $SITE_ROOT/* $url
|
166
|
-
# ;;
|
167
|
-
esac
|