diff --git a/dockerfiles/env.rc b/dockerfiles/.env similarity index 84% rename from dockerfiles/env.rc rename to dockerfiles/.env index 0a67936..06b907d 100644 --- a/dockerfiles/env.rc +++ b/dockerfiles/.env @@ -3,7 +3,7 @@ DACHS_LOGS_PATH="./tmp/logs" # Dachs branch/repository version. # Options are: stable, backports, beta. -INSTALL_REPO=latest +INSTALL_REPO=main # PostgreSQL version to build containers -PG_VERSION=13 +PG_VERSION=15 diff --git a/dockerfiles/dachs/Dockerfile.dachs_postgres b/dockerfiles/dachs/Dockerfile.dachs_postgres index 485f891..3b87d81 100644 --- a/dockerfiles/dachs/Dockerfile.dachs_postgres +++ b/dockerfiles/dachs/Dockerfile.dachs_postgres @@ -1,12 +1,8 @@ -FROM "debian:bullseye" +FROM debian:bookworm LABEL Description=DaCHS\ is\ a\ publishing\ infrastructure\ for\ the\ Virtual\ Observatory. \ - Author=Markus\ Demleitner \ - URL=http://docs.g-vo.org/DaCHS \ Reference=http://arxiv.org/abs/1408.5733 -MAINTAINER "Carlos H Brandt " - # Everyday tools RUN DEBIAN_FRONTEND='noninteractive' \ && apt-get update \ @@ -24,20 +20,13 @@ RUN DEBIAN_FRONTEND='noninteractive' \ # BUILD argument for extra repositories (besides debian/stable) to install dachs. # Options are: # - backports (debian/backports) -# - gavo or latest: (gavo/release + gavo/beta) +# - gavo/beta (gavo/release + gavo/beta) # - main (debian/main) -# * If not defined, default is 'latest' -ARG INSTALL_REPO="${INSTALL_REPO:-latest}" - -ENV REPO_RELEASE='deb http://vo.ari.uni-heidelberg.de/debian release main' -ENV REPO_BETA='deb http://vo.ari.uni-heidelberg.de/debian beta main' -ENV REPO_BACKPORT='deb http://deb.debian.org/debian bullseye-backports main contrib' - -ENV APT_SOURCES="/etc/apt/sources.list.d/gavo.list" -COPY /etc/apt_sources.list "$APT_SOURCES" +# * If not defined, default is 'main' +ARG INSTALL_REPO="${INSTALL_REPO:-main}" -ARG PG_VERSION=13 -ENV PG_VERSION=${PG_VERSION} +ENV _APT_SOURCES="/etc/apt/sources.list.d/gavo.list" +COPY etc/apt_sources.list "$_APT_SOURCES" # Some fixes on the environment # --- @@ -47,21 +36,28 @@ ENV PG_VERSION=${PG_VERSION} ENV LC_ALL=C.UTF-8 RUN echo LC_ALL="$LC_ALL" > /etc/default/locale -#RUN sed -i 's/exit 101/exit 0/' /usr/sbin/policy-rc.d +RUN sed -i 's/exit 101/exit 0/' /usr/sbin/policy-rc.d # --- # Setup GAVO key, then repositories according to INSTALL_REPO -RUN wget -qO - http://docs.g-vo.org/archive-key.asc | apt-key add - +# RUN wget -qO - http://docs.g-vo.org/archive-key.asc | apt-key add - +RUN curl https://vo.ari.uni-heidelberg.de/debian/gavo-archive-keyring.asc \ + | tee /etc/apt/trusted.gpg.d/gavo-archive.keyring.asc +# If installing any version other than "main", backports is in there: RUN [ "$INSTALL_REPO" != "main" ] \ - && sed -i '/deb.*backports/s/^#//' $APT_SOURCES \ + && sed -i '/deb.*backports/s/^#//' $_APT_SOURCES \ || echo "NOT using debian/backports repo" -RUN [ "$INSTALL_REPO" = "gavo" -o "$INSTALL_REPO" = "latest" ] \ - && sed -i '/deb.*heidelberg/s/^#//' $APT_SOURCES \ +# If installing -- i.e, "beta" version -- uncomment gavo's release and beta repos +RUN [ "$INSTALL_REPO" = "gavo/beta" -o "$INSTALL_REPO" = "latest" -o "$INSTALL_REPO" = "gavo" ] \ + && sed -i '/deb.*heidelberg/s/^#//' $_APT_SOURCES \ || echo "NOT using gavo beta/release repos" -RUN echo "Using the following repositories:" && grep "deb" $APT_SOURCES +RUN echo "Using the following repositories:" && grep "deb" $_APT_SOURCES + +ARG PG_VERSION=15 +ENV PG_VERSION=${PG_VERSION} RUN DEBIAN_FRONTEND='noninteractive' && \ apt-get update && \ diff --git a/dockerfiles/docker-compose.full.yml b/dockerfiles/docker-compose.full.yml index daf80d1..1175b16 100644 --- a/dockerfiles/docker-compose.full.yml +++ b/dockerfiles/docker-compose.full.yml @@ -3,45 +3,47 @@ version: '3' services: postgres: - container_name: postgres - image: dachs:postgres - build: - context: ./dachs - args: - PG_VERSION: "${PG_VERSION:-13}" - tty: true - network_mode: 'bridge' + build: + context: ./dachs + args: + PG_VERSION: "${PG_VERSION:-15}" + image: dachs:postgres + container_name: postgres + tty: true + network_mode: 'bridge' + dachs: - container_name: dachs - image: dachs:server - depends_on: - - postgres - build: - context: ./dachs - dockerfile: Dockerfile.dachs_server - args: - INSTALL_REPO: "${INSTALL_REPO}" - PG_VERSION: "${PG_VERSION:-13}" - links: - - postgres - tty: true - network_mode: 'bridge' - ports: - - 8080:8080 - volumes: - - "${DACHS_LOGS_PATH:-./tmp/logs}:/var/gavo/logs" + build: + context: ./dachs + dockerfile: Dockerfile.dachs_server + args: + INSTALL_REPO: "${INSTALL_REPO}" + PG_VERSION: "${PG_VERSION:-15}" + image: dachs:server + container_name: dachs + tty: true + network_mode: 'bridge' + depends_on: + - postgres + links: + - postgres + ports: + - 8080:8080 + volumes: + - "${DACHS_LOGS_PATH:-./tmp/logs}:/var/gavo/logs" + - awstats: - container_name: awstats - image: dachs:awstats - depends_on: - - dachs - build: - context: ./awstats - tty: true - network_mode: 'bridge' - ports: - - 80:80 - volumes: - - "${DACHS_LOGS_PATH:-./tmp/logs}:/var/gavo/logs:ro" + # awstats: + # container_name: awstats + # image: dachs:awstats + # depends_on: + # - dachs + # build: + # context: ./awstats + # tty: true + # network_mode: 'bridge' + # ports: + # - 80:80 + # volumes: + # - "${DACHS_LOGS_PATH:-./tmp/logs}:/var/gavo/logs:ro" diff --git a/dockerfiles/docker-compose.yml b/dockerfiles/docker-compose.yml index e35d3f2..e1b9d33 100644 --- a/dockerfiles/docker-compose.yml +++ b/dockerfiles/docker-compose.yml @@ -7,6 +7,8 @@ services: build: context: ./dachs dockerfile: Dockerfile + args: + INSTALL_REPO: "${INSTALL_REPO}" container_name: dachs command: ['--rcfile','/start.sh']