Skip to content

Commit

Permalink
Merge pull request #8 from unckan/upgrade_2024
Browse files Browse the repository at this point in the history
Upgrade 2024
  • Loading branch information
avdata99 authored Oct 21, 2024
2 parents e9730b4 + 441b544 commit 4e03cc1
Show file tree
Hide file tree
Showing 39 changed files with 887 additions and 845 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/publish-develop-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,35 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Read CKAN_UNI_VERSION from docker/ckan/files/env/base.env
run: |
echo "CKAN_UNI_VERSION=$(grep CKAN_UNI_VERSION docker/ckan/files/env/base.env | cut -d '=' -f2)" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build develop version for ckan-base 2.9

- name: Build develop UNCKAN ver ${{ env.CKAN_UNI_VERSION }}
uses: docker/build-push-action@v2
with:
context: ckan-2.9/ckan
file: ckan-2.9/ckan/Dockerfile
context: docker/ckan
file: docker/ckan/Dockerfile
push: true
tags: avdata99/ckan-env:ckan29
build-args: |
ENV_NAME=gh-action
TZ=America/Argentina/Cordoba
tags: |
avdata99/unckan:dev
avdata99/unckan:dev-${{ env.CKAN_UNI_VERSION }}
env:
CKAN_UNI_VERSION: ${{ env.CKAN_UNI_VERSION }}
24 changes: 19 additions & 5 deletions .github/workflows/publish-latest-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,39 @@ name: Build and publish production docker-ckan image version
on:
push:
branches:
- master
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Read CKAN_UNI_VERSION from docker/ckan/files/env/base.env
run: |
echo "CKAN_UNI_VERSION=$(grep CKAN_UNI_VERSION docker/ckan/files/env/base.env | cut -d '=' -f2)" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build latest version for ckan-base 2.9

- name: Build develop UNCKAN ver ${{ env.CKAN_UNI_VERSION }}
uses: docker/build-push-action@v2
with:
context: ckan-2.9/ckan
file: ckan-2.9/ckan/Dockerfile-prod
context: docker/ckan
file: docker/ckan/Dockerfile
push: true
tags: avdata99/ckan-env:latest
build-args: |
ENV_NAME=gh-action
TZ=America/Argentina/Cordoba
tags: |
avdata99/unckan:latest
avdata99/unckan:${{ env.CKAN_UNI_VERSION }}
env:
CKAN_UNI_VERSION: ${{ env.CKAN_UNI_VERSION }}
34 changes: 34 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test Build
on:
- push

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Read CKAN_UNI_VERSION from docker/ckan/files/env/base.env
id: read_version
run: |
UNI_VERSION=$(grep CKAN_UNI_VERSION docker/ckan/files/env/base.env | cut -d '=' -f2)
echo "CKAN_UNI_VERSION found $UNI_VERSION"
echo "CKAN_UNI_VERSION=$UNI_VERSION" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build develop UNCKAN ver ${{ env.CKAN_UNI_VERSION }}
uses: docker/build-push-action@v2
with:
context: docker/ckan
file: docker/ckan/Dockerfile
build-args: |
ENV_NAME=gh-action
TZ=America/Argentina/Cordoba
push: false
env:
CKAN_UNI_VERSION: ${{ env.CKAN_UNI_VERSION }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ docker-compose.yml
docker-compose-prod.yml

docker/src/*
docker/ckan/files/env/local.env

*.pyc
*.pyo
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Docker Stars](https://img.shields.io/docker/stars/avdata99/ckan-env.svg)](https://hub.docker.com/r/avdata99/ckan-env/tags)
[![Docker Pulls](https://img.shields.io/docker/pulls/avdata99/ckan-env.svg)](https://hub.docker.com/r/avdata99/ckan-env/tags)
[![Docker Automated](https://img.shields.io/docker/automated/avdata99/ckan-env.svg)](https://hub.docker.com/r/avdata99/ckan-env/tags)
[![Docker Build](https://img.shields.io/docker/build/avdata99/ckan-env.svg)](https://hub.docker.com/r/avdata99/ckan-env/tags)
[![Docker Stars](https://img.shields.io/docker/stars/avdata99/unckan.svg)](https://hub.docker.com/r/avdata99/unckan/tags)
[![Docker Pulls](https://img.shields.io/docker/pulls/avdata99/unckan.svg)](https://hub.docker.com/r/avdata99/unckan/tags)
[![Docker Automated](https://img.shields.io/docker/automated/avdata99/unckan.svg)](https://hub.docker.com/r/avdata99/unckan/tags)
[![Docker Build](https://img.shields.io/docker/build/avdata99/unckan.svg)](https://hub.docker.com/r/avdata99/unckan/tags)

# Entorno CKAN para Universidades Argentinas

Expand All @@ -15,9 +15,9 @@ Al estar desarrollado sobre CKAN este proyecto permite además subir datos manua
## Entorno

El portal completo está compuesto por:
- CKAN 2.9 (python 3)
- CKAN 2.10.5 (python 3)
+ Portal de datos base
- Extensiones
- Extensiones (en progreso)
+ [SIU Harvester](https://github.com/unckan/ckanext-siu-harvester): Extensión para cosechar datos desde sistemas [SIU](https://www.siu.edu.ar/) usando la librería [pySIUData](https://github.com/unckan/pySIUdata) (creada especialmente como parte de este proceso).
+ [Dataset previews](https://github.com/unckan/ckanext-datasetpreview): Extensión CKAN para agregar gráficos a los datasets de manera simple.
+ El template CKAN usado está en el repositorio [UI Universidad](https://github.com/unckan/ckanext-ui-universidad).
Expand All @@ -32,4 +32,4 @@ docker-compose up

## Imagen pública

La compilación de esta imagen esta [disponible en DockerHub](https://hub.docker.com/r/avdata99/ckan-env/tags?page=1&ordering=last_updated) (el tag ckan29 corresponde a la ultima version en desarrollo).
La compilación de esta imagen esta [disponible en DockerHub](https://hub.docker.com/r/avdata99/unckan/tags?page=1&ordering=last_updated).
97 changes: 0 additions & 97 deletions docker/.env

This file was deleted.

41 changes: 23 additions & 18 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
.PHONY: build clean up debug

build:
docker-compose build
@if [ ! -f docker-compose.yml ]; then cp docker-compose.example.yml docker-compose.yml; fi
$(eval TZ ?= America/Argentina/Cordoba)
$(eval ENV_NAME ?= local)
BUILDKIT_PROGRESS=plain docker build \
--file ckan/Dockerfile \
--build-arg ENV_NAME=${ENV_NAME} \
--build-arg TZ=${TZ} \
-t unckan:${ENV_NAME} ckan
echo "Build done unckan:${ENV_NAME}"

down:
docker compose down

clean:
docker-compose down -v --remove-orphans
docker compose down -v --remove-orphans

debug:
docker-compose build
docker-compose run --service-ports ckan
docker compose build
docker compose run --service-ports ckan_uni

up:
docker-compose up
docker compose up

build-up:
docker-compose build
docker-compose up

gather:
docker-compose exec ckan ckan harvester gather-consumer

fetch:
docker-compose exec ckan ckan harvester fetch-consumer

harvest-run:
docker-compose exec ckan ckan harvester run
docker compose build
docker compose up

ckan-worker:
docker-compose exec ckan ckan jobs worker
docker compose exec ckan_uni ckan jobs worker

bash:
docker compose exec ckan_uni bash
Loading

0 comments on commit 4e03cc1

Please sign in to comment.