Framadate : store to registry

This commit is contained in:
Gitouche 2022-08-16 21:04:49 +02:00
parent 829abcbae5
commit b4fd5cf6bb
5 changed files with 22 additions and 8 deletions

View file

@ -7,6 +7,7 @@ framadate:
stage: test stage: test
script: script:
- cd podman-framadate - cd podman-framadate
- ./ci_build_images.sh
- GARBAYE_FRAMADATE_ADMIN_PASSWORD=adlkjsqghen GARBAYE_FRAMADATE_MYSQL_ROOT_PASSWORD=zekjsljgnrxx GARBAYE_FRAMADATE_MYSQL_PASSWORD=azekljqlkcsdql GARBAYE_FRAMADATE_ENV_LISTENPORT=18087 ./05_freshinstall.sh - GARBAYE_FRAMADATE_ADMIN_PASSWORD=adlkjsqghen GARBAYE_FRAMADATE_MYSQL_ROOT_PASSWORD=zekjsljgnrxx GARBAYE_FRAMADATE_MYSQL_PASSWORD=azekljqlkcsdql GARBAYE_FRAMADATE_ENV_LISTENPORT=18087 ./05_freshinstall.sh
- ./20_enable.sh - ./20_enable.sh
- ./30_start.sh && sleep 10 - ./30_start.sh && sleep 10

View file

@ -30,6 +30,7 @@ export framadate_release
export listen_if export listen_if
export listen_port export listen_port
podman pull ${framadate_image}:${framadate_version}
podman pull docker.io/library/php:7-apache && podman pull docker.io/library/php:7-apache &&
podman pull docker.io/library/mysql:5.7 && podman pull docker.io/library/mysql:5.7 &&
podman-compose up -d && podman-compose up -d &&

View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
source ${ABSDIR}/../functions.sh
source ${ABSDIR}/vars.sh
ensure_pwd_is_scriptdir
ensure_not_root
if ! podman image exists ${framadate_image}:${framadate_version}; then
podman build -t "${framadate_image}":"${framadate_version}" --build-arg=version="${framadate_release}" --file ./docker/Dockerfile &&
then
echo "Image ${framadate_image}:${framadate_version} already built"
fi
oci_push_to_registry ${framadate_image}:${framadate_version}

View file

@ -14,12 +14,7 @@ services:
framadate-app: framadate-app:
container_name: framadate-app container_name: framadate-app
build: image: "${framadate_image}:${framadate_version}"
dockerfile: ./docker/Dockerfile
context: .
args:
version: "$framadate_release"
image: "localhost/framadate-app:${framadate_release}"
depends_on: depends_on:
- db - db
ports: ports:

View file

@ -2,7 +2,8 @@
pod_name='podman-framadate' pod_name='podman-framadate'
service_name="pod-${pod_name}.service" service_name="pod-${pod_name}.service"
framadate_release='1.1.19' framadate_image='git.garbaye.fr/garbaye/framadate-app'
framadate_version='1.1.19'
dbvolume='podman-framadate_framadate-db' dbvolume='podman-framadate_framadate-db'
listen_if="${GARBAYE_FRAMADATE_ENV_LISTENIF:-127.0.0.1}" listen_if="${GARBAYE_FRAMADATE_ENV_LISTENIF:-127.0.0.1}"
listen_port="${GARBAYE_FRAMADATE_ENV_LISTENPORT:-8087}" listen_port="${GARBAYE_FRAMADATE_ENV_LISTENPORT:-8087}"
@ -11,4 +12,4 @@ GARBAYE_FRAMADATE_DOMAIN="${GARBAYE_FRAMADATE_ENV_DOMAIN:-sondage.garbaye.fr}"
GARBAYE_FRAMADATE_ADMIN_MAIL="${GARBAYE_FRAMADATE_ENV_ADMIN_MAIL:-contact-framadate@garbaye.fr}" GARBAYE_FRAMADATE_ADMIN_MAIL="${GARBAYE_FRAMADATE_ENV_ADMIN_MAIL:-contact-framadate@garbaye.fr}"
get_default_iface_ipv4 GARBAYE_FRAMADATE_SMTP_SERVER get_default_iface_ipv4 GARBAYE_FRAMADATE_SMTP_SERVER
envvars='GARBAYE_FRAMADATE_ADMIN_PASSWORD GARBAYE_FRAMADATE_MYSQL_ROOT_PASSWORD GARBAYE_FRAMADATE_MYSQL_PASSWORD' envvars='GARBAYE_FRAMADATE_ADMIN_PASSWORD GARBAYE_FRAMADATE_MYSQL_ROOT_PASSWORD GARBAYE_FRAMADATE_MYSQL_PASSWORD'
upstream_images='localhost/framadate-app docker.io/library/composer docker.io/library/mysql docker.io/library/php docker.io/library/composer' upstream_images="${framadate_image} localhost/framadate-app docker.io/library/composer docker.io/library/mysql docker.io/library/php docker.io/library/composer"