Commit 52d78903f1ba910662b6667e569e2b4f37de283c
1 parent
41472fd2
Exists in
master
copy conf files instead of git clone
Showing
4 changed files
with
20 additions
and
294 deletions
Show diff stats
conf/dachs-dockerfile
... | ... | @@ -55,21 +55,22 @@ RUN chown dachsroot:gavo -R /home/dachsroot/.ssh |
55 | 55 | # Installation des sources |
56 | 56 | ### |
57 | 57 | |
58 | -RUN mkdir $PATH$SERVER -p | |
59 | -RUN git clone $GITURL/$GIT.git $HOMEPATH/$SERVER/$GIT | |
58 | +#RUN mkdir $PATH$SERVER -p | |
59 | +#RUN git clone $GITURL/$GIT.git $HOMEPATH/$SERVER/$GIT | |
60 | +COPY . $HOMEPATH | |
61 | + | |
60 | 62 | |
61 | 63 | #on déplace les fichiers |
62 | -RUN cp $HOMEPATH/$SERVER/$GIT/conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf | |
63 | -RUN cp $HOMEPATH/$SERVER/$GIT/conf/ports.conf /etc/apache2/ports.conf | |
64 | -RUN cp $HOMEPATH/$SERVER/$GIT/conf/awstats.dachs.conf /etc/awstats/awstats.dachs.conf | |
65 | -RUN cp $HOMEPATH/$SERVER/$GIT/conf/gavo.rc /etc/gavo.rc | |
66 | -RUN cp $HOMEPATH/$SERVER/$GIT/conf/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh | |
64 | +RUN cp $HOMEPATH/000-default.conf /etc/apache2/sites-enabled/000-default.conf | |
65 | +RUN cp $HOMEPATH/ports.conf /etc/apache2/ports.conf | |
66 | +RUN cp $HOMEPATH/awstats.dachs.conf /etc/awstats/awstats.dachs.conf | |
67 | +RUN cp $HOMEPATH/gavo.rc /etc/gavo.rc | |
68 | +RUN cp $HOMEPATH/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh | |
67 | 69 | RUN chmod +x /usr/bin/docker-entrypoint.sh |
68 | -RUN cp $HOMEPATH/$SERVER/$GIT/conf/defaultmeta.txt /var/gavo/etc/defaultmeta.txt | |
70 | +RUN cp $HOMEPATH/defaultmeta.txt /var/gavo/etc/defaultmeta.txt | |
69 | 71 | RUN mkdir /var/gavo/web/nv_static/img/ -p |
70 | -RUN cp $HOMEPATH/$SERVER/$GIT/conf/logo* /var/gavo/web/nv_static/img/ | |
71 | -RUN cp -r $HOMEPATH/$SERVER/$GIT/services/* /var/gavo/inputs/ | |
72 | - | |
72 | +RUN cp $HOMEPATH/logo* /var/gavo/web/nv_static/img/ | |
73 | +RUN cp -r $HOMEPATH/services/* /var/gavo/inputs/ | |
73 | 74 | |
74 | 75 | ### |
75 | 76 | #configuration de dachs |
... | ... | @@ -100,8 +101,9 @@ RUN chgrp 755 /etc/cron.daily/awstats |
100 | 101 | # Script de démarrage des servcices |
101 | 102 | ### |
102 | 103 | |
103 | -RUN echo "cd $HOMEPATH/$SERVER/$GIT/" >> /usr/bin/docker-entrypoint.sh | |
104 | -RUN echo "git pull" >> /usr/bin/docker-entrypoint.sh | |
104 | +#RUN echo "cd $HOMEPATH/$SERVER/$GIT/" >> /usr/bin/docker-entrypoint.sh | |
105 | +#RUN echo "git pull" >> /usr/bin/docker-entrypoint.sh | |
106 | + | |
105 | 107 | # ajout au script pour maintenir docker up |
106 | 108 | #RUN echo "tail -f /dev/null" >> /usr/bin/docker-entrypoint.sh |
107 | 109 | ... | ... |
conf/docker-compose.yml
... | ... | @@ -4,15 +4,16 @@ services: |
4 | 4 | dachs: |
5 | 5 | container_name: dachs-voparis |
6 | 6 | image: dachs-voparis |
7 | + | |
7 | 8 | tty: true |
8 | 9 | expose: |
9 | - - "81" | |
10 | - - "8081" | |
10 | + - "80" | |
11 | + - "8080" | |
11 | 12 | - "22" |
12 | 13 | ports: |
13 | 14 | - "2222:22" |
14 | - - "80:81" | |
15 | - - "8080:8081" | |
15 | + - "80:80" | |
16 | + - "8080:8080" | |
16 | 17 | build: |
17 | 18 | context: . |
18 | 19 | dockerfile: dachs-dockerfile |
... | ... | @@ -23,7 +24,6 @@ services: |
23 | 24 | - "GIT=${GIT}" |
24 | 25 | secrets: |
25 | 26 | - source: id_rsa |
26 | - | |
27 | 27 | secrets: |
28 | 28 | id_rsa: |
29 | 29 | file: id_rsa.prive | ... | ... |
services/planets/data/Masses2.csv deleted
... | ... | @@ -1,9 +0,0 @@ |
1 | -target_name,mean_radius,mean_radius_uncertainty,equatorial_radius,equatorial_radius_uncertainty,polar_radius,polar_radius_uncertainty,rms_deviation,elevation_max,elevation_min,mass,distance_to_primary,sideral_rotation_period,obs_idi,thumbnail_url | |
2 | -Mercury,2439.7,1.0,2439.7,1.0,2439.7,1.0,1,4.6,2.5,3.3014E23,57909227.,1407.504,1,http://www.lesia.obspm.fr/BDIP/bdip_icone/bdip8397.jpg | |
3 | -Venus,6051.8,1.0,6051.8,1.0,6051.8,1.0,1,11,2,4.86732E24,108209475.,-5832.432,2,http://www.lesia.obspm.fr/BDIP/bdip_icone/bdip7534.jpg | |
4 | -Earth,6371.00,0.01,6378.14, 0.01,6356.75, 0.01,3.57,8.85,11.52,5.97219E24,149598262.,23.93447232,3,http://www.lesia.obspm.fr/BDIP/bdip_icone/bdip7534.jpg | |
5 | -Mars,3389.5,0.2,3396.19,0.1,3376.,0.1,3.0,22.64,7.55,6.41693E23,227943824.,24.624,4,http://www.lesia.obspm.fr/BDIP/bdip_icone/bdip3073.jpg,http://www.lesia.obspm.fr/BDIP/bdip_icone/bdip3073.jpg | |
6 | -Jupiter,69911.,6,71492.,4,66854.,10,62.1,31,102,1.89813E27,778340821.,9.92496,5,http://www.lesia.obspm.fr/BDIP/bdip_icone/bdip0001.jpg | |
7 | -Saturn,58232.,6,60268.,4,54364.,10,102.9,8,205,5.68319E26,1426666422.,10.656,6,http://www.lesia.obspm.fr/BDIP/bdip_icone/bdip2716.jpg | |
8 | -Uranus,25362.,7,25559.,4,24973.,20,16.8,28,0,8.68103E25,2870658186.,-17.232,7,http://www.lesia.obspm.fr/BDIP/bdip_icone/bdip2716.jpg | |
9 | -Neptune,24622.,19,24764.,15,24341.,30,8,14,0,1.0241E26,4498396441.,16.104,8,http://www.lesia.obspm.fr/BDIP/bdip_icone/bdip2716.jpg |
services/planets/q.rd deleted
... | ... | @@ -1,267 +0,0 @@ |
1 | -<resource schema="planets"> | |
2 | - <meta name="title">Characteristics of Planets (demo)</meta> | |
3 | - <meta name="shortname">Planets</meta> | |
4 | - <meta name="shortName">Planets</meta> | |
5 | - <meta name="description" format="plain"> | |
6 | -Demonstration service of EPN-TAP v1: main characteristics of planets. Data are included in the table, therefore most relevant parameters are non-standard in EPN-TAP. Data are retrieved from Archinal et al 2009 (IAU report, 2011CeMDA.109..101A) [radii] and Cox et al 2000 (Allen's astrophysical quantities, 2000asqu.book.....C) [masses, heliocentric distances, and rotation periods]. </meta> | |
7 | - <meta name="creationDate">2015-08-16T09:42:00Z</meta> | |
8 | - <meta name="subject">planet</meta> | |
9 | - <meta name="subject">mass</meta> | |
10 | - <meta name="subject">radius</meta> | |
11 | - <meta name="subject">period</meta> | |
12 | - <meta name="copyright">LESIA-Obs Paris</meta> | |
13 | - <meta name="creator.name">Stephane Erard</meta> | |
14 | - <meta name="publisher">Paris Astronomical Data Centre - LESIA</meta> | |
15 | - <meta name="contact.name">Stephane Erard</meta> | |
16 | - <meta name="contact.email">vo.paris@obspm.fr</meta> | |
17 | - <meta name="contact.address">Observatoire de Paris VOPDC, bat. Perrault, 77 av. Denfert Rochereau, 75014 Paris, FRANCE</meta> | |
18 | - <meta name="source">2000asqu.book.....C</meta> | |
19 | - <meta name="contentLevel">General</meta> | |
20 | - <meta name="contentLevel">University</meta> | |
21 | - <meta name="contentLevel">Research</meta> | |
22 | - <meta name="contentLevel">Amateur</meta> | |
23 | - <meta name="utype">ivo://vopdc.obspm/std/EpnCore#schema-2.0</meta> | |
24 | - | |
25 | - | |
26 | - | |
27 | -<!-- METADATA COMPLETE --> | |
28 | - | |
29 | - <table id="epn_core" onDisk="true" adql="True"> | |
30 | - <mixin spatial_frame_type="celestial" | |
31 | - optional_columns= "time_scale publisher bib_reference thumbnail_url" >//epntap2#table-2_0</mixin> | |
32 | - | |
33 | - | |
34 | - <column name="distance_to_primary" type="double precision" | |
35 | - tablehead="Distance_to_primary" unit="km" | |
36 | - description="Extra: Mean heliocentric distance (semi-major axis)" | |
37 | - ucd="pos.distance;stat.min" | |
38 | - verbLevel="2"/> | |
39 | - | |
40 | - <column name="mean_radius" type="double precision" | |
41 | - tablehead="Mean_radius" unit="km" | |
42 | - description="Extra: Mean radius (1 bar level on giant planets)" | |
43 | - ucd="phys.size.radius" | |
44 | - verbLevel="2"/> | |
45 | - | |
46 | - <column name="mean_radius_uncertainty" type="double precision" | |
47 | - tablehead="Mean_radius_uncertainty" unit="km" | |
48 | - description="Extra: Uncertainty on mean radius" | |
49 | - ucd="phys.size.radius;stat.error" | |
50 | - verbLevel="2"/> | |
51 | - | |
52 | - <column name="equatorial_radius" type="double precision" | |
53 | - tablehead="Equatorial_radius" unit="km" | |
54 | - description="Extra: equatorial radius (1 bar level on giant planets)" | |
55 | - ucd="phys.size.radius" | |
56 | - verbLevel="2"/> | |
57 | - | |
58 | - <column name="equatorial_radius_uncertainty" type="double precision" | |
59 | - tablehead="Equatorial_radius_uncertainty" unit="km" | |
60 | - description="Extra: Uncertainty on equatorial radius" | |
61 | - ucd="phys.size.radius;stat.error" | |
62 | - verbLevel="2"/> | |
63 | - | |
64 | - <column name="polar_radius" type="double precision" | |
65 | - tablehead="Polar_radius" unit="km" | |
66 | - description="Extra: polar radius (1 bar level on giant planets)" | |
67 | - ucd="phys.size.radius" | |
68 | - verbLevel="2"/> | |
69 | - | |
70 | - <column name="polar_radius_uncertainty" type="double precision" | |
71 | - tablehead="Polar_radius_uncertainty" unit="km" | |
72 | - description="Extra: Uncertainty on polar radius" | |
73 | - ucd="phys.size.radius;stat.error" | |
74 | - verbLevel="2"/> | |
75 | - | |
76 | - <column name="rms_deviation" type="double precision" | |
77 | - tablehead="RMS_deviation" unit="km" | |
78 | - description="Extra: Average departure from ellipsoid" | |
79 | - ucd="phys.size.radius;stat.stdev" | |
80 | - verbLevel="2"/> | |
81 | - | |
82 | - <column name="elevation_min" type="double precision" | |
83 | - tablehead="Elevation_min" unit="km" | |
84 | - description="Deepest depression relative to ellipsoid" | |
85 | - ucd="pos.bodyrc.alt;stat.min" | |
86 | - verbLevel="2"/> | |
87 | - | |
88 | - <column name="elevation_max" type="double precision" | |
89 | - tablehead="Elevation_max" unit="km" | |
90 | - description="Highest relief relative to ellipsoid" | |
91 | - ucd="pos.bodyrc.alt;stat.max" | |
92 | - verbLevel="2"/> | |
93 | - | |
94 | - <column name="mass" type="double precision" | |
95 | - tablehead="Mass" unit="kg" | |
96 | - description="Mass of planet" | |
97 | - ucd="phys.mass" | |
98 | - verbLevel="2"/> | |
99 | - | |
100 | - <column name="sideral_rotation_period" type="double precision" | |
101 | - tablehead="Sideral_rotation_period" unit="h" | |
102 | - description="Rotation period (internal for giant planets)" | |
103 | - ucd="time.period.rotation" | |
104 | - verbLevel="2"/> | |
105 | - | |
106 | - <column name="ds_id" type="text" | |
107 | - tablehead="Dataset ID" | |
108 | - description="Identifier for this object to use when calling | |
109 | - datalink services" | |
110 | - ucd="meta.id"/> | |
111 | - | |
112 | - <column name="datalink_url" type="text" | |
113 | - tablehead="Datalink" | |
114 | - description="Datalinks and services for this object" | |
115 | - ucd="meta.ref.url;meta.datalink"/> | |
116 | - </table> | |
117 | - | |
118 | -<!-- TABLE COMPLETE --> | |
119 | - | |
120 | - <data id="import"> | |
121 | - <sources>data/Masses2.csv</sources> | |
122 | - <csvGrammar> | |
123 | - <rowfilter procDef="//products#define"> | |
124 | - <bind name="table">"\schema.epn_core"</bind> | |
125 | - </rowfilter> | |
126 | - </csvGrammar> | |
127 | - | |
128 | - <make table="epn_core"> | |
129 | - <rowmaker idmaps="*"> | |
130 | - <var key="dataproduct_type">"ci"</var> | |
131 | - <var key="spatial_frame_type">"none"</var> | |
132 | - | |
133 | - <var key="target_name" source="target_name" /> | |
134 | - <var key="granule_uid" source="target_name" /> | |
135 | - <var key="granule_gid">"Planet" </var> | |
136 | - <var key="obs_id">"N/A"</var> | |
137 | - <!-- <var key="target_class">"planet" </var> --> | |
138 | - <!-- <var key="time_scale">"UTC" </var> --> | |
139 | - | |
140 | - | |
141 | - <var key="distance_to_primary" source="distance_to_primary" /> | |
142 | - | |
143 | - <var key="creation_date">"2015-08-20T07:54:00.00" </var> | |
144 | - <var key="modification_date">"2017-12-15T17:54:00.00" </var> | |
145 | - <var key="release_date">"2015-08-20T07:54:00.00" </var> | |
146 | - | |
147 | - <var key="service_title">"planets" </var> | |
148 | - <var key="bib_reference">"2011CeMDA.109..101A#2000asqu.book.....C"</var> | |
149 | - <var key="publisher">"LESIA" </var> | |
150 | - <var key="target_class">"planet"</var> | |
151 | - | |
152 | - <!-- the id for our datalink services is artificial: it's | |
153 | - just the concatenation of the object class and the object name | |
154 | - --> | |
155 | - <var key="ds_id">@target_class+"/"+@target_name</var> | |
156 | - <var key="datalink_url">("\getConfig{web}{serverURL}/\rdId/epdl/dlmeta" | |
157 | - +"?ID="+urllib.parse.quote(@ds_id))</var> | |
158 | - | |
159 | - <apply procDef="//epntap2#populate-2_0" name="fillepn"> | |
160 | - <bind name="granule_gid">@granule_gid</bind> | |
161 | - <bind name="granule_uid">@granule_uid</bind> | |
162 | - <bind name="obs_id">@obs_id</bind> | |
163 | - <bind name="target_class">@target_class</bind> | |
164 | - <bind name="time_scale">"UTC"</bind> | |
165 | - | |
166 | - <bind name="target_name">@target_name</bind> | |
167 | - <bind name="instrument_host_name">""</bind> | |
168 | - <bind name="instrument_name">""</bind> | |
169 | - | |
170 | - | |
171 | - <bind key="processing_level">5</bind> | |
172 | - | |
173 | - <bind name="dataproduct_type">@dataproduct_type</bind> | |
174 | - <bind name="measurement_type">"phys.mass#phys.size.radius"</bind> | |
175 | - | |
176 | - | |
177 | - <bind name="service_title">@service_title</bind> | |
178 | - <bind name="creation_date">@creation_date</bind> | |
179 | - <bind name="modification_date">@modification_date</bind> | |
180 | - <bind name="release_date">@release_date</bind> | |
181 | - | |
182 | - </apply> | |
183 | - <map key="thumbnail_url">@thumbnail_url</map> | |
184 | - </rowmaker> | |
185 | - </make> | |
186 | - </data> | |
187 | - | |
188 | - <service id="epdl" allowed="dlget,dlmeta"> | |
189 | - <datalinkCore> | |
190 | - <metaMaker> | |
191 | - <code> | |
192 | - yield MS(InputKey, name="epoch", | |
193 | - type="double precision", | |
194 | - unit="d", ucd="meta.epoch", | |
195 | - description="Time the ephemeris is to be computed for, JD", | |
196 | - multiplicity="forced-single", | |
197 | - values=MS(Values, | |
198 | - min=2400000, | |
199 | - max=3000000)) | |
200 | - </code> | |
201 | - </metaMaker> | |
202 | - | |
203 | - <metaMaker> | |
204 | - <code> | |
205 | - with base.getTableConn() as conn: | |
206 | - url = list(conn.query("SELECT thumbnail_url from \schema.epn_core where" | |
207 | - " target_class=%(targetClass)s and target_name=%(targetName)s", { | |
208 | - "targetClass": descriptor.targetClass, | |
209 | - "targetName": descriptor.targetName}))[0][0] | |
210 | - yield LinkDef(descriptor.pubDID, | |
211 | - url, | |
212 | - description="A preview of the planet", | |
213 | - semantics="#preview", | |
214 | - contentType="image/jpeg") | |
215 | - </code> | |
216 | - </metaMaker> | |
217 | - | |
218 | - <descriptorGenerator> | |
219 | - <setup> | |
220 | - <code> | |
221 | - class PlanetDescriptor(object): | |
222 | - def __init__(self, pubDID): | |
223 | - self.pubDID = pubDID | |
224 | - self.targetClass, self.targetName = self.pubDID.split("/", 1) | |
225 | - self.computeEphemerisId() | |
226 | - | |
227 | - def computeEphemerisId(self): | |
228 | - shortClass = { | |
229 | - 'planet': 'p', | |
230 | - 'satellite': 's', | |
231 | - }[self.targetClass] | |
232 | - self.ephId = "{}:{}".format( | |
233 | - shortClass, self.targetName) | |
234 | - description="computed ephemeris of the planet", | |
235 | - </code> | |
236 | - </setup> | |
237 | - <code> | |
238 | - return PlanetDescriptor(pubDID) | |
239 | - </code> | |
240 | - </descriptorGenerator> | |
241 | - | |
242 | - <dataFunction> | |
243 | - <setup> | |
244 | - <par name="upstream_service_url" | |
245 | - >"http://vo.imcce.fr/webservices/miriade/ephemcc_query.php?-from=vespa&"</par> | |
246 | - <code> | |
247 | - | |
248 | - from urllib.parse import urlencode | |
249 | - from gavo.svcs import WebRedirect | |
250 | - import urllib.parse | |
251 | - </code> | |
252 | - </setup> | |
253 | - <code> | |
254 | - parameters = { | |
255 | - "-name": descriptor.ephId, | |
256 | - "-ep": args["epoch"], | |
257 | - } | |
258 | - raise WebRedirect(upstream_service_url+urlencode(parameters)) | |
259 | - </code> | |
260 | - </dataFunction> | |
261 | - </datalinkCore> | |
262 | - </service> | |
263 | - <data id="collection" auto="false"> | |
264 | - <make table="epn_core"/> | |
265 | - <publish/> | |
266 | - </data> | |
267 | -</resource> |