Skip to content

Commit

Permalink
Fix name of compose env file
Browse files Browse the repository at this point in the history
  • Loading branch information
chbrandt committed Aug 3, 2023
1 parent 9d703d5 commit 9f464d6
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 64 deletions.
4 changes: 2 additions & 2 deletions dockerfiles/env.rc → dockerfiles/.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
42 changes: 19 additions & 23 deletions dockerfiles/dachs/Dockerfile.dachs_postgres
Original file line number Diff line number Diff line change
@@ -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 <github:chbrandt>"

# Everyday tools
RUN DEBIAN_FRONTEND='noninteractive' \
&& apt-get update \
Expand All @@ -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
# ---
Expand All @@ -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 && \
Expand Down
80 changes: 41 additions & 39 deletions dockerfiles/docker-compose.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions dockerfiles/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ services:
build:
context: ./dachs
dockerfile: Dockerfile
args:
INSTALL_REPO: "${INSTALL_REPO}"

container_name: dachs
command: ['--rcfile','/start.sh']
Expand Down

0 comments on commit 9f464d6

Please sign in to comment.