From 52d78903f1ba910662b6667e569e2b4f37de283c Mon Sep 17 00:00:00 2001 From: Chloé Azria Date: Wed, 1 Mar 2023 14:12:44 +0100 Subject: [PATCH] copy conf files instead of git clone --- conf/dachs-dockerfile | 28 +++++++++++++++------------- conf/docker-compose.yml | 10 +++++----- services/planets/data/Masses2.csv | 9 --------- services/planets/q.rd | 267 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 files changed, 20 insertions(+), 294 deletions(-) delete mode 100644 services/planets/data/Masses2.csv delete mode 100644 services/planets/q.rd diff --git a/conf/dachs-dockerfile b/conf/dachs-dockerfile index 371d855..51841b2 100644 --- a/conf/dachs-dockerfile +++ b/conf/dachs-dockerfile @@ -55,21 +55,22 @@ RUN chown dachsroot:gavo -R /home/dachsroot/.ssh # Installation des sources ### -RUN mkdir $PATH$SERVER -p -RUN git clone $GITURL/$GIT.git $HOMEPATH/$SERVER/$GIT +#RUN mkdir $PATH$SERVER -p +#RUN git clone $GITURL/$GIT.git $HOMEPATH/$SERVER/$GIT +COPY . $HOMEPATH + #on déplace les fichiers -RUN cp $HOMEPATH/$SERVER/$GIT/conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf -RUN cp $HOMEPATH/$SERVER/$GIT/conf/ports.conf /etc/apache2/ports.conf -RUN cp $HOMEPATH/$SERVER/$GIT/conf/awstats.dachs.conf /etc/awstats/awstats.dachs.conf -RUN cp $HOMEPATH/$SERVER/$GIT/conf/gavo.rc /etc/gavo.rc -RUN cp $HOMEPATH/$SERVER/$GIT/conf/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN cp $HOMEPATH/000-default.conf /etc/apache2/sites-enabled/000-default.conf +RUN cp $HOMEPATH/ports.conf /etc/apache2/ports.conf +RUN cp $HOMEPATH/awstats.dachs.conf /etc/awstats/awstats.dachs.conf +RUN cp $HOMEPATH/gavo.rc /etc/gavo.rc +RUN cp $HOMEPATH/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh RUN chmod +x /usr/bin/docker-entrypoint.sh -RUN cp $HOMEPATH/$SERVER/$GIT/conf/defaultmeta.txt /var/gavo/etc/defaultmeta.txt +RUN cp $HOMEPATH/defaultmeta.txt /var/gavo/etc/defaultmeta.txt RUN mkdir /var/gavo/web/nv_static/img/ -p -RUN cp $HOMEPATH/$SERVER/$GIT/conf/logo* /var/gavo/web/nv_static/img/ -RUN cp -r $HOMEPATH/$SERVER/$GIT/services/* /var/gavo/inputs/ - +RUN cp $HOMEPATH/logo* /var/gavo/web/nv_static/img/ +RUN cp -r $HOMEPATH/services/* /var/gavo/inputs/ ### #configuration de dachs @@ -100,8 +101,9 @@ RUN chgrp 755 /etc/cron.daily/awstats # Script de démarrage des servcices ### -RUN echo "cd $HOMEPATH/$SERVER/$GIT/" >> /usr/bin/docker-entrypoint.sh -RUN echo "git pull" >> /usr/bin/docker-entrypoint.sh +#RUN echo "cd $HOMEPATH/$SERVER/$GIT/" >> /usr/bin/docker-entrypoint.sh +#RUN echo "git pull" >> /usr/bin/docker-entrypoint.sh + # ajout au script pour maintenir docker up #RUN echo "tail -f /dev/null" >> /usr/bin/docker-entrypoint.sh diff --git a/conf/docker-compose.yml b/conf/docker-compose.yml index 4a6d268..6fbc787 100644 --- a/conf/docker-compose.yml +++ b/conf/docker-compose.yml @@ -4,15 +4,16 @@ services: dachs: container_name: dachs-voparis image: dachs-voparis + tty: true expose: - - "81" - - "8081" + - "80" + - "8080" - "22" ports: - "2222:22" - - "80:81" - - "8080:8081" + - "80:80" + - "8080:8080" build: context: . dockerfile: dachs-dockerfile @@ -23,7 +24,6 @@ services: - "GIT=${GIT}" secrets: - source: id_rsa - secrets: id_rsa: file: id_rsa.prive diff --git a/services/planets/data/Masses2.csv b/services/planets/data/Masses2.csv deleted file mode 100644 index 29b442c..0000000 --- a/services/planets/data/Masses2.csv +++ /dev/null @@ -1,9 +0,0 @@ -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 -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 -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 -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 -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 -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 -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 -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 -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 diff --git a/services/planets/q.rd b/services/planets/q.rd deleted file mode 100644 index 3c8d4b7..0000000 --- a/services/planets/q.rd +++ /dev/null @@ -1,267 +0,0 @@ - - Characteristics of Planets (demo) - Planets - Planets - -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]. - 2015-08-16T09:42:00Z - planet - mass - radius - period - LESIA-Obs Paris - Stephane Erard - Paris Astronomical Data Centre - LESIA - Stephane Erard - vo.paris@obspm.fr - Observatoire de Paris VOPDC, bat. Perrault, 77 av. Denfert Rochereau, 75014 Paris, FRANCE - 2000asqu.book.....C - General - University - Research - Amateur - ivo://vopdc.obspm/std/EpnCore#schema-2.0 - - - - - - - //epntap2#table-2_0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - data/Masses2.csv - - - "\schema.epn_core" - - - - - - "ci" - "none" - - - - "Planet" - "N/A" - - - - - - - "2015-08-20T07:54:00.00" - "2017-12-15T17:54:00.00" - "2015-08-20T07:54:00.00" - - "planets" - "2011CeMDA.109..101A#2000asqu.book.....C" - "LESIA" - "planet" - - - @target_class+"/"+@target_name - ("\getConfig{web}{serverURL}/\rdId/epdl/dlmeta" - +"?ID="+urllib.parse.quote(@ds_id)) - - - @granule_gid - @granule_uid - @obs_id - @target_class - "UTC" - - @target_name - "" - "" - - - 5 - - @dataproduct_type - "phys.mass#phys.size.radius" - - - @service_title - @creation_date - @modification_date - @release_date - - - @thumbnail_url - - - - - - - - - yield MS(InputKey, name="epoch", - type="double precision", - unit="d", ucd="meta.epoch", - description="Time the ephemeris is to be computed for, JD", - multiplicity="forced-single", - values=MS(Values, - min=2400000, - max=3000000)) - - - - - - with base.getTableConn() as conn: - url = list(conn.query("SELECT thumbnail_url from \schema.epn_core where" - " target_class=%(targetClass)s and target_name=%(targetName)s", { - "targetClass": descriptor.targetClass, - "targetName": descriptor.targetName}))[0][0] - yield LinkDef(descriptor.pubDID, - url, - description="A preview of the planet", - semantics="#preview", - contentType="image/jpeg") - - - - - - - class PlanetDescriptor(object): - def __init__(self, pubDID): - self.pubDID = pubDID - self.targetClass, self.targetName = self.pubDID.split("/", 1) - self.computeEphemerisId() - - def computeEphemerisId(self): - shortClass = { - 'planet': 'p', - 'satellite': 's', - }[self.targetClass] - self.ephId = "{}:{}".format( - shortClass, self.targetName) - description="computed ephemeris of the planet", - - - - return PlanetDescriptor(pubDID) - - - - - - "http://vo.imcce.fr/webservices/miriade/ephemcc_query.php?-from=vespa&" - - - from urllib.parse import urlencode - from gavo.svcs import WebRedirect - import urllib.parse - - - - parameters = { - "-name": descriptor.ephId, - "-ep": args["epoch"], - } - raise WebRedirect(upstream_service_url+urlencode(parameters)) - - - - - - - - -
-- libgit2 0.21.2