Commit 743f2de3aeef7f4475b76f64ff7b908fbd451f13
1 parent
baef8fa2
Exists in
master
working with only the .env institution,server config
Showing
5 changed files
with
30 additions
and
48 deletions
Show diff stats
.env.example
1 | 1 | # enter here all key = value you need to path in docker-compose.yaml file - example for voparis-tap-planeto |
2 | 2 | VERSION=11 |
3 | -SERVER=voparis-tap-planeto | |
3 | +#SERVER=voparis-tap-planeto | |
4 | 4 | # depot sans l'extension .git |
5 | -GIT=voparis-tap-planeto | |
6 | -GITURL=https://voparis-gitlab.obspm.fr/dachs | |
5 | +#GIT=voparis-tap-planeto | |
6 | +#GITURL=https://voparis-gitlab.obspm.fr/dachs | |
7 | 7 | PUBKEY="your local public key" | ... | ... |
dachs-dockerfile
1 | 1 | ARG VERSION |
2 | 2 | FROM debian:$VERSION |
3 | 3 | |
4 | -ARG SERVER | |
5 | 4 | ARG GITURL |
6 | -ARG GIT | |
5 | +ARG SERVER | |
6 | +ARG INSTITUTION | |
7 | + | |
7 | 8 | ARG HOMEPATH=/home/dachsroot |
8 | 9 | ARG PUBKEY |
9 | 10 | |
11 | + | |
10 | 12 | ### |
11 | 13 | #install de la clé + depot Dachs |
12 | 14 | # ajout de postgres en amont sinon l'install de dachs plante |
... | ... | @@ -16,6 +18,7 @@ RUN apt-get -y update |
16 | 18 | RUN apt-get -y upgrade |
17 | 19 | RUN apt-get install -y curl apt-utils |
18 | 20 | |
21 | +# add dachs source | |
19 | 22 | RUN curl -o /etc/apt/trusted.gpg.d/gavo-archive.key.asc https://docs.g-vo.org/archive-key.asc |
20 | 23 | RUN echo "deb http://vo.ari.uni-heidelberg.de/debian release main" > /etc/apt/sources.list.d/dachs.list |
21 | 24 | |
... | ... | @@ -27,9 +30,7 @@ RUN echo "deb http://vo.ari.uni-heidelberg.de/debian release main" > /etc/apt/so |
27 | 30 | RUN apt-get -y update |
28 | 31 | RUN apt-get -y upgrade |
29 | 32 | RUN apt-get install -y postgresql-13 postgresql-13-q3c postgresql-13-pgsphere |
30 | -#RUN service postgresql restart | |
31 | 33 | RUN apt-get install -y git wget awstats net-tools vim |
32 | -#RUN apt-get install -y gavodachs2-server | |
33 | 34 | RUN service postgresql restart && apt-get install -y gavodachs2-server |
34 | 35 | RUN apt-get install -y openssh-server openssh-client apache2 w3m |
35 | 36 | |
... | ... | @@ -55,21 +56,33 @@ RUN chown dachsroot:gavo -R /home/dachsroot/.ssh |
55 | 56 | # Installation des sources |
56 | 57 | ### |
57 | 58 | |
58 | -#RUN mkdir $PATH$SERVER -p | |
59 | -#RUN git clone $GITURL/$GIT.git $HOMEPATH/$SERVER/$GIT | |
59 | +#copy the configuration files into the docker | |
60 | 60 | COPY . $HOMEPATH |
61 | 61 | |
62 | 62 | |
63 | +#import dachs server configuration files from git | |
64 | +RUN echo $GITURL/vespa/dachs/servers/$INSTITUTION/$SERVER.git | |
65 | +RUN git clone $GITURL/vespa/dachs/servers/$INSTITUTION/$SERVER.git $HOMEPATH/server | |
66 | + | |
67 | + | |
68 | + | |
63 | 69 | #on déplace les fichiers |
70 | +# dachs server configuration | |
64 | 71 | RUN cp $HOMEPATH/000-default.conf /etc/apache2/sites-enabled/000-default.conf |
65 | 72 | RUN cp $HOMEPATH/ports.conf /etc/apache2/ports.conf |
66 | 73 | RUN cp $HOMEPATH/awstats.dachs.conf /etc/awstats/awstats.dachs.conf |
67 | -RUN cp $HOMEPATH/gavo.rc /etc/gavo.rc | |
74 | +RUN cp $HOMEPATH/server/gavo.rc /etc/gavo.rc | |
68 | 75 | RUN cp $HOMEPATH/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh |
69 | 76 | RUN chmod +x /usr/bin/docker-entrypoint.sh |
70 | -RUN cp $HOMEPATH/defaultmeta.txt /var/gavo/etc/defaultmeta.txt | |
77 | +RUN cp $HOMEPATH/server/defaultmeta.txt /var/gavo/etc/defaultmeta.txt | |
71 | 78 | RUN mkdir /var/gavo/web/nv_static/img/ -p |
72 | 79 | RUN cp $HOMEPATH/logo* /var/gavo/web/nv_static/img/ |
80 | + | |
81 | + | |
82 | +#import services from git | |
83 | +#clone all repositories from the group -- only if the gitlab project is Public | |
84 | +RUN wget -O $HOMEPATH/group.json $GITURL'/api/v4/groups/vespa%2Fdachs%2Fservices%2F'$INSTITUTION'%2F'$SERVER | |
85 | +RUN mkdir $HOMEPATH/services/ && cd $HOMEPATH/services/ && egrep -o 'https://[^"]+\.git' $HOMEPATH/group.json|xargs -n 1 -P 8 git clone | |
73 | 86 | RUN cp -r $HOMEPATH/services/* /var/gavo/inputs/ |
74 | 87 | |
75 | 88 | ### |
... | ... | @@ -98,14 +111,14 @@ RUN chgrp 755 /etc/cron.daily/awstats |
98 | 111 | |
99 | 112 | |
100 | 113 | ### |
101 | -# Script de démarrage des servcices | |
114 | +# Script de démarrage des services | |
102 | 115 | ### |
103 | 116 | |
104 | -#RUN echo "cd $HOMEPATH/$SERVER/$GIT/" >> /usr/bin/docker-entrypoint.sh | |
105 | -#RUN echo "git pull" >> /usr/bin/docker-entrypoint.sh | |
117 | +RUN echo "cd $HOMEPATH/$SERVER/$GIT/" >> /usr/bin/docker-entrypoint.sh | |
118 | +RUN echo "git pull" >> /usr/bin/docker-entrypoint.sh | |
106 | 119 | |
107 | 120 | # ajout au script pour maintenir docker up |
108 | -#RUN echo "tail -f /dev/null" >> /usr/bin/docker-entrypoint.sh | |
121 | +RUN echo "tail -f /dev/null" >> /usr/bin/docker-entrypoint.sh | |
109 | 122 | |
110 | 123 | |
111 | 124 | ENTRYPOINT /usr/bin/docker-entrypoint.sh && tail -f /dev/null | ... | ... |
defaultmeta.txt deleted
... | ... | @@ -1,19 +0,0 @@ |
1 | -publisher: Paris Astronomical Data Centre | |
2 | -publisherID: ivo://vopdc.obspm | |
3 | -contact.name: PADC support team | |
4 | -contact.address: 77 av. Denfert Rochereau, 75014 Paris, FRANCE | |
5 | -contact.email: vo.paris@obspm.fr | |
6 | -contact.telephone: 0033140512082 | |
7 | -creator.name: PADC | |
8 | -creator.logo: http://voparis-srv-paris.obspm.fr/logos/PADC_small.png | |
9 | -authority.creationDate: 2012-01-09T12:53:33 | |
10 | -authority.title: Paris Astronomical Data Centre Authority | |
11 | -authority.shortName: PADC | |
12 | -authority.description: The Paris Astronomical Data Centre project aims at providing VO access to its databases ressources, at participating to international standards developments, at implementing VO compliant simulation codes, data visualization and analysis software. This Naming Authority is used to identify the resources provided by Paris Astronomical Data Centre at Observatoire de Paris, Paris, FRANCE | |
13 | -authority.referenceURL: http://padc.obspm.fr | |
14 | -authority.managingOrg: ivo://vopdc | |
15 | -organization.title: Observatoire de Paris | |
16 | -organization.description: Founded in 1667, the Observatoire de Paris is the largest national research center for astronomy. | |
17 | -organization.referenceURL: http://www.obspm.fr | |
18 | -site.description: The Paris Astronomical Data Centre project aims at providing VO access to its databases ressources, at participating to international standards developments, at implementing VO compliant simulation codes, data visualization and analysis software. | |
19 | - |
docker-compose.yml
... | ... | @@ -19,9 +19,10 @@ services: |
19 | 19 | dockerfile: dachs-dockerfile |
20 | 20 | args: |
21 | 21 | - "VERSION=${VERSION}" |
22 | + - "INSTITUTION=${INSTITUTION}" | |
22 | 23 | - "SERVER=${SERVER}" |
23 | 24 | - "GITURL=${GITURL}" |
24 | - - "GIT=${GIT}" | |
25 | + - "PUBKEY=${PUBKEY}" | |
25 | 26 | secrets: |
26 | 27 | - source: id_rsa |
27 | 28 | secrets: | ... | ... |
gavo.rc deleted
... | ... | @@ -1,13 +0,0 @@ |
1 | -[general] | |
2 | -rootDir: /var/gavo | |
3 | -maintainerAddress: pierre.lesidaner@obspm.fr | |
4 | -[web] | |
5 | -bindAddress: | |
6 | -serverPort: 80 | |
7 | -#serverURL: http://145.238.197.199:81 | |
8 | -serverURL: http://127.0.0.1:80 | |
9 | -sitename: portablelp | |
10 | -corsOriginPat: http.* | |
11 | -logFormat: combined | |
12 | -[ivoa] | |
13 | -authority: vopdc.obspm |