Compare View

switch
from
...
to
 
Commits (2)
conf/.env
1 1 # enter here all key = value you need to path in docker-compose.yaml file
2   -VERSION=11
  2 +VERSION=12
  3 +# PostgreSQL version to build containers
  4 +PG_VERSION=15
  5 +
3 6  
4 7 ###########GITHUB PATH :as the repository is set in gitlab
5 8 GITREPO_INSTITUTION=omp
... ...
conf/dachs-dockerfile
... ... @@ -11,6 +11,7 @@ ARG APACHE_PORT
11 11 ARG SERVERNAME
12 12 ARG DOMAIN
13 13 ARG PROTOCOL
  14 +ARG PG_VERSION
14 15  
15 16  
16 17  
... ... @@ -22,15 +23,26 @@ RUN apt-get install -y curl apt-utils
22 23 RUN curl -o /etc/apt/trusted.gpg.d/gavo-archive.key.asc https://docs.g-vo.org/archive-key.asc
23 24 RUN echo "deb http://vo.ari.uni-heidelberg.de/debian release main" > /etc/apt/sources.list.d/dachs.list
24 25  
  26 +# Some fixes on the environment
  27 +# ---
  28 +# This is the brute-force solution for Debian;
  29 +# I am having problems in set locales non-interactively,
  30 +# and since I really need the "C/UTF8" for postgres, will just set it for all.
  31 +ENV LC_ALL=C.UTF-8
  32 +RUN echo LC_ALL="$LC_ALL" > /etc/default/locale
  33 +
  34 +RUN sed -i 's/exit 101/exit 0/' /usr/sbin/policy-rc.d
  35 +
25 36 ###
26 37 # Server Configuration
27 38 ###
28 39 RUN apt-get -y update
29 40 RUN apt-get -y upgrade
30   -RUN apt-get install -y postgresql-13 postgresql-13-q3c postgresql-13-pgsphere
  41 +RUN apt-get install -y postgresql postgresql-$PG_VERSION-q3c postgresql-$PG_VERSION-pgsphere
31 42 RUN apt-get install -y git wget awstats net-tools vim libgeo-ipfree-perl
32 43 RUN service postgresql restart && apt-get install -y gavodachs2-server
33 44 RUN apt-get install -y openssh-server openssh-client apache2 w3m
  45 +RUN sed -i 's/exit 101/exit 0/' /usr/sbin/policy-rc.d
34 46  
35 47  
36 48 #copy the configuration files into the docker
... ...
conf/docker-compose.yml
... ... @@ -4,8 +4,9 @@ services:
4 4 dachs:
5 5 container_name: ${CONTAINER_NAME}
6 6 image: ${CONTAINER_NAME}
7   -
8 7 tty: true
  8 +
  9 +
9 10 expose:
10 11 - "${DACHS_PORT}"
11 12 - "${APACHE_PORT}"
... ... @@ -19,6 +20,7 @@ services:
19 20 dockerfile: dachs-dockerfile
20 21 args:
21 22 - "VERSION=${VERSION}"
  23 + - "PG_VERSION=${PG_VERSION}"
22 24 - "GITREPO_SERVER=${GITREPO_SERVER}"
23 25 - "GITREPO_INSTITUTION=${GITREPO_INSTITUTION}"
24 26 - "DACHS_PORT=${DACHS_PORT}"
... ...
conf/docker-entrypoint.sh
... ... @@ -3,7 +3,7 @@
3 3 # script executé au démarrage du docker
4 4 service ssh restart
5 5 service postgresql restart
6   -dachs serve start
  6 +service dachs start
7 7  
8 8 chown -R dachsroot:gavo /var/gavo/logs
9 9 chown -R root:gavo /var/gavo/logs/server.stderr
... ... @@ -33,3 +33,5 @@ if ([ ! -f "/home/dachsroot/.ssh/know_hosts" ] && [ -f "/run/secrets/id_rsa" ]);
33 33 chown dachsroot:gavo /home/dachsroot/.ssh/known_hosts
34 34 chmod 600 /home/dachsroot/.ssh/known_hosts
35 35 fi
  36 +
  37 +dachs serve start -f
... ...