Compare View
Commits (2)
-
…that put a -f after dachs serve start to run the service
Showing
4 changed files
Show diff stats
conf/.env
1 | # enter here all key = value you need to path in docker-compose.yaml file | 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 | ###########GITHUB PATH :as the repository is set in gitlab | 7 | ###########GITHUB PATH :as the repository is set in gitlab |
5 | GITREPO_INSTITUTION=omp | 8 | GITREPO_INSTITUTION=omp |
conf/dachs-dockerfile
@@ -11,6 +11,7 @@ ARG APACHE_PORT | @@ -11,6 +11,7 @@ ARG APACHE_PORT | ||
11 | ARG SERVERNAME | 11 | ARG SERVERNAME |
12 | ARG DOMAIN | 12 | ARG DOMAIN |
13 | ARG PROTOCOL | 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,15 +23,26 @@ RUN apt-get install -y curl apt-utils | ||
22 | RUN curl -o /etc/apt/trusted.gpg.d/gavo-archive.key.asc https://docs.g-vo.org/archive-key.asc | 23 | RUN curl -o /etc/apt/trusted.gpg.d/gavo-archive.key.asc https://docs.g-vo.org/archive-key.asc |
23 | RUN echo "deb http://vo.ari.uni-heidelberg.de/debian release main" > /etc/apt/sources.list.d/dachs.list | 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 | # Server Configuration | 37 | # Server Configuration |
27 | ### | 38 | ### |
28 | RUN apt-get -y update | 39 | RUN apt-get -y update |
29 | RUN apt-get -y upgrade | 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 | RUN apt-get install -y git wget awstats net-tools vim libgeo-ipfree-perl | 42 | RUN apt-get install -y git wget awstats net-tools vim libgeo-ipfree-perl |
32 | RUN service postgresql restart && apt-get install -y gavodachs2-server | 43 | RUN service postgresql restart && apt-get install -y gavodachs2-server |
33 | RUN apt-get install -y openssh-server openssh-client apache2 w3m | 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 | #copy the configuration files into the docker | 48 | #copy the configuration files into the docker |
conf/docker-compose.yml
@@ -4,8 +4,9 @@ services: | @@ -4,8 +4,9 @@ services: | ||
4 | dachs: | 4 | dachs: |
5 | container_name: ${CONTAINER_NAME} | 5 | container_name: ${CONTAINER_NAME} |
6 | image: ${CONTAINER_NAME} | 6 | image: ${CONTAINER_NAME} |
7 | - | ||
8 | tty: true | 7 | tty: true |
8 | + | ||
9 | + | ||
9 | expose: | 10 | expose: |
10 | - "${DACHS_PORT}" | 11 | - "${DACHS_PORT}" |
11 | - "${APACHE_PORT}" | 12 | - "${APACHE_PORT}" |
@@ -19,6 +20,7 @@ services: | @@ -19,6 +20,7 @@ services: | ||
19 | dockerfile: dachs-dockerfile | 20 | dockerfile: dachs-dockerfile |
20 | args: | 21 | args: |
21 | - "VERSION=${VERSION}" | 22 | - "VERSION=${VERSION}" |
23 | + - "PG_VERSION=${PG_VERSION}" | ||
22 | - "GITREPO_SERVER=${GITREPO_SERVER}" | 24 | - "GITREPO_SERVER=${GITREPO_SERVER}" |
23 | - "GITREPO_INSTITUTION=${GITREPO_INSTITUTION}" | 25 | - "GITREPO_INSTITUTION=${GITREPO_INSTITUTION}" |
24 | - "DACHS_PORT=${DACHS_PORT}" | 26 | - "DACHS_PORT=${DACHS_PORT}" |
conf/docker-entrypoint.sh
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | # script executé au démarrage du docker | 3 | # script executé au démarrage du docker |
4 | service ssh restart | 4 | service ssh restart |
5 | service postgresql restart | 5 | service postgresql restart |
6 | -dachs serve start | 6 | +service dachs start |
7 | 7 | ||
8 | chown -R dachsroot:gavo /var/gavo/logs | 8 | chown -R dachsroot:gavo /var/gavo/logs |
9 | chown -R root:gavo /var/gavo/logs/server.stderr | 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,3 +33,5 @@ if ([ ! -f "/home/dachsroot/.ssh/know_hosts" ] && [ -f "/run/secrets/id_rsa" ]); | ||
33 | chown dachsroot:gavo /home/dachsroot/.ssh/known_hosts | 33 | chown dachsroot:gavo /home/dachsroot/.ssh/known_hosts |
34 | chmod 600 /home/dachsroot/.ssh/known_hosts | 34 | chmod 600 /home/dachsroot/.ssh/known_hosts |
35 | fi | 35 | fi |
36 | + | ||
37 | +dachs serve start -f |